Failed Conditions
Pull Request — master (#371)
by
unknown
02:27
created
pages/home.page.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	</div>
32 32
 
33 33
 	<?php
34
-    if (true === !$config->system->no_lures) {
35
-        ?>
34
+	if (true === !$config->system->no_lures) {
35
+		?>
36 36
 		<div class="flex-item-homepage big-data"> <!-- POKESTOPS -->
37 37
 			<a href="pokestops">
38 38
 				<img src="core/img/lure-module.png" alt="Discover the <?= $config->infos->site_name; ?> Pokéstops" width=50 class="big-icon">
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 			</a>
42 42
 		</div>
43 43
 		<?php
44
-    }
45
-    if (true === $config->system->homepage_raids) {
46
-        ?>
44
+	}
45
+	if (true === $config->system->homepage_raids) {
46
+		?>
47 47
 		<div class="flex-item-homepage flex-item-homepage-homepage big-data"> <!-- RAIDS -->
48 48
 			<a href="raids">
49 49
 				<img src="core/img/raid.png" alt="Discover the <?= $config->infos->site_name; ?> Raids" width=50
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 			</a>
54 54
 		</div>
55 55
 		<?php
56
-    }
57
-    ?>
56
+	}
57
+	?>
58 58
 
59 59
 	<div class="flex-item-homepage big-data">
60 60
 		<a href="<?= $config->homewidget->url; ?>" target="_blank">
@@ -70,22 +70,22 @@  discard block
 block discarded – undo
70 70
 	<div class="col-md-12 text-center">
71 71
 		<h2 class="text-center sub-title">
72 72
 			<?php
73
-            if ($config->system->recents_filter) {
74
-                ?>
73
+			if ($config->system->recents_filter) {
74
+				?>
75 75
 				<?= $locales->RECENT_MYTHIC_SPAWNS; ?>
76 76
 			<?php
77
-            } else {
78
-                ?>
77
+			} else {
78
+				?>
79 79
 				<?= $locales->RECENT_SPAWNS; ?>
80 80
 			<?php
81
-            } ?>
81
+			} ?>
82 82
 		</h2>
83 83
 		<div class="last-mon-js">
84 84
 		<?php
85
-        $timers = array();
86
-        foreach ($recents as $key => $pokemon) {
87
-            $id = $pokemon->id;
88
-            $uid = $pokemon->uid; ?>
85
+		$timers = array();
86
+		foreach ($recents as $key => $pokemon) {
87
+			$id = $pokemon->id;
88
+			$uid = $pokemon->uid; ?>
89 89
 			<div class="col-md-1 col-xs-4 pokemon-single" data-pokeid="<?= $id; ?>" data-pokeuid="<?= $uid; ?>" >
90 90
 				<a href="pokemon/<?= $id; ?>"><img src="<?= $pokemons->pokemon->$id->img; ?>" alt="<?= $pokemons->pokemon->$id->name; ?>" class="img-responsive"></a>
91 91
 				<a href="pokemon/<?= $id; ?>"><p class="pkmn-name"><?= $pokemons->pokemon->$id->name; ?></p></a>
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 					<small class="pokemon-timer">00:00:00</small>
94 94
 				</a>
95 95
 				<?php
96
-                if ($config->system->recents_encounter_details) {
97
-                    if ($pokemon->encdetails->available) {
98
-                        if ($config->system->iv_numbers) {
99
-                            ?>
96
+				if ($config->system->recents_encounter_details) {
97
+					if ($pokemon->encdetails->available) {
98
+						if ($config->system->iv_numbers) {
99
+							?>
100 100
 							<div class="progress" style="height: 15px; margin-bottom: 0">
101 101
 								<div title="Attack IV: <?= $pokemon->encdetails->attack; ?>" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->encdetails->attack; ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3); ?>%; line-height: 16px">
102 102
 									<span class="sr-only"><?= $locales->ATTACK; ?> IV: <?= $pokemon->encdetails->attack; ?></span><?= $pokemon->encdetails->attack; ?>
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 								</div>
110 110
 							</div>
111 111
 						<?php
112
-                        } else {
113
-                            ?>
112
+						} else {
113
+							?>
114 114
 							<div class="progress" style="height: 6px; width: 80%; margin: 5px auto 0 auto;">
115 115
 								<div title="Attack IV: <?= $pokemon->encdetails->attack; ?>" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->encdetails->attack; ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= ((100 / 15) * $pokemon->encdetails->attack) / 3; ?>%">
116 116
 									<span class="sr-only"><?= $locales->ATTACK; ?> IV: <?= $pokemon->encdetails->attack; ?></span>
@@ -123,12 +123,12 @@  discard block
 block discarded – undo
123 123
 								</div>
124 124
 							</div>
125 125
 					<?php
126
-                        } ?>
126
+						} ?>
127 127
 						<small><?= $pokemon->encdetails->cp; ?></small>
128 128
 					<?php
129
-                    } else {
130
-                        if ($config->system->iv_numbers) {
131
-                            ?>
129
+					} else {
130
+						if ($config->system->iv_numbers) {
131
+							?>
132 132
 							<div class="progress" style="height: 15px; margin-bottom: 0">
133 133
 								<div title="Attack IV: not available" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?= $pokemon->encdetails->attack; ?>" aria-valuemin="0" aria-valuemax="45" style="width: <?= (100 / 3); ?>%; line-height: 16px">
134 134
 									<span class="sr-only"><?= $locales->ATTACK; ?> IV: <?= $locales->NOT_AVAILABLE; ?></span>?
@@ -141,24 +141,24 @@  discard block
 block discarded – undo
141 141
 								</div>
142 142
 							</div>
143 143
 						<?php
144
-                        } else {
145
-                            ?>
144
+						} else {
145
+							?>
146 146
 						<div class="progress" style="height: 6px; width: 80%; margin: 5px auto 0 auto;">
147 147
 							<div title="IV not available" class="progress-bar" role="progressbar" style="width: 100%; background-color: rgb(210,210,210)" aria-valuenow="1" aria-valuemin="0" aria-valuemax="1">
148 148
 								<span class="sr-only">IV <?= $locales->NOT_AVAILABLE; ?></span>
149 149
 							</div>
150 150
 						</div>
151 151
 					<?php
152
-                        } ?>
152
+						} ?>
153 153
 						<small>???</small>
154 154
 					<?php
155
-                    }
156
-                } ?>
155
+					}
156
+				} ?>
157 157
 				</div>
158 158
 			<?php
159
-            // Array with ids and countdowns to start at the end of this file
160
-            $timers[$uid] = $pokemon->last_seen - time();
161
-        } ?>
159
+			// Array with ids and countdowns to start at the end of this file
160
+			$timers[$uid] = $pokemon->last_seen - time();
161
+		} ?>
162 162
 		</div>
163 163
 	</div>
164 164
 </div>
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 	<h2 class="text-center sub-title"><?= $locales->FIGHT_TITLE; ?></h2>
169 169
 
170 170
 		<?php
171
-            foreach ($home->teams as $team => $total) {
172
-                if ($home->teams->rocket) {
173
-                    ?>
171
+			foreach ($home->teams as $team => $total) {
172
+				if ($home->teams->rocket) {
173
+					?>
174 174
 
175 175
 					<div class="col-md-3 col-sm-6 col-sm-12 team">
176 176
 						<div class="row">
@@ -178,34 +178,34 @@  discard block
 block discarded – undo
178 178
 								<p style="margin-top:0.5em;text-align:center;"><img src="core/img/<?= $team; ?>.png" alt="Team <?= $team; ?>" class="img-responsive" style="display:inline-block" width=80> <strong class="total-<?= $team; ?>-js">0</strong> <?= $locales->GYMS; ?></p>
179 179
 
180 180
 				<?php
181
-                } else {
182
-                    ?>
181
+				} else {
182
+					?>
183 183
 
184 184
 					<div class="col-md-4 col-sm-6 col-sm-12 team">
185 185
 						<div class="row">
186 186
 							<div class="col-xs-12 col-sm-12">
187 187
 								<?php
188
-                                    if ('rocket' != $team) {
189
-                                        ?>
188
+									if ('rocket' != $team) {
189
+										?>
190 190
 										<p style="margin-top:0.5em;text-align:center;"><img src="core/img/<?= $team; ?>.png" alt="Team <?= $team; ?>" class="img-responsive" style="display:inline-block" width=80> <strong class="total-<?= $team; ?>-js">0</strong> <?= $locales->GYMS; ?></p>
191 191
 										<?php
192
-                                    }
193
-                } ?>
192
+									}
193
+				} ?>
194 194
 							</div>
195 195
 						</div>
196 196
 					</div>					
197 197
 				<?php
198
-            } ?>
198
+			} ?>
199 199
 </div>
200 200
 
201 201
 
202 202
 <script>
203 203
 	document.addEventListener('DOMContentLoaded', function() {
204 204
 		<?php
205
-        foreach (array_reverse($timers, true) as $id => $countdown) {
206
-            ?>
205
+		foreach (array_reverse($timers, true) as $id => $countdown) {
206
+			?>
207 207
 			startTimer(<?= $countdown; ?>,"<?= $id; ?>");
208 208
 		<?php
209
-        } ?>
209
+		} ?>
210 210
 	}, false);
211 211
 </script>
Please login to merge, or discard this patch.
pages/pokedex.page.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,19 +25,19 @@
 block discarded – undo
25 25
 
26 26
 
27 27
 		<?php foreach ($pokedex as $pokemon) {
28
-    ?>
28
+	?>
29 29
 
30 30
 			<div class="flex-item pokemon-single">
31 31
 
32 32
 				<a href="<?= $pokemon->permalink; ?>"><img src="<?= $pokemon->img; ?>" alt="<?= $pokemon->name; ?>" class="img-responsive <?php if (0 == $pokemon->spawn) {
33
-        echo 'unseen';
34
-    } ?> "></a>
33
+		echo 'unseen';
34
+	} ?> "></a>
35 35
 				<p class="pkmn-name"><a href="<?= $pokemon->permalink; ?>">#<?= sprintf('%03d<br>%s', $pokemon->id, $pokemon->name); ?></a></p>
36 36
 				<p><?php if (0 == $pokemon->spawn) {
37
-        echo $locales->UNSEEN;
38
-    } else {
39
-        echo $pokemon->spawn_count.$locales->SEEN;
40
-    } ?> </p>
37
+		echo $locales->UNSEEN;
38
+	} else {
39
+		echo $pokemon->spawn_count.$locales->SEEN;
40
+	} ?> </p>
41 41
 
42 42
 			</div>
43 43
 
Please login to merge, or discard this patch.
pages/trainer.page.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 <?=
105 105
 $trainerName = '';
106 106
 if (isset($_GET['name'])) {
107
-    $trainerName = htmlspecialchars($_GET['name'], ENT_QUOTES);
107
+	$trainerName = htmlspecialchars($_GET['name'], ENT_QUOTES);
108 108
 }
109 109
 
110 110
 ?>
Please login to merge, or discard this patch.
pages/gymhistory.page.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 <?=
70 70
 $gymName = '';
71 71
 if (isset($_GET['name'])) {
72
-    $gymName = htmlspecialchars($_GET['name'], ENT_QUOTES);
72
+	$gymName = htmlspecialchars($_GET['name'], ENT_QUOTES);
73 73
 }
74 74
 ?>
75 75
 var gymName = "<?= $gymName; ?>";
Please login to merge, or discard this patch.
pages/gym.page.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 
16 16
 	<?php
17 17
 
18
-    foreach ($teams as $team_name => $team) {
19
-        // We do not display the team rocket result as it's not a real team
18
+	foreach ($teams as $team_name => $team) {
19
+		// We do not display the team rocket result as it's not a real team
20 20
 
21
-        if ('rocket' != $team_name) {
22
-            $upper_team_name = strtoupper($team_name);
23
-            $lower_team_name = strtolower($team_name); ?>
21
+		if ('rocket' != $team_name) {
22
+			$upper_team_name = strtoupper($team_name);
23
+			$lower_team_name = strtolower($team_name); ?>
24 24
 
25 25
 	<div class="col-md-4 col-sm-4 col-xs-12 big-data"> <!-- <?= $team_name; ?> -->
26 26
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			<p style="margin-top:1em"><?= $locales->GYMS_GUARDIANS; ?></p>
41 41
 
42 42
 			<?php foreach ($team->guardians as $guardian) {
43
-                ?>
43
+				?>
44 44
 
45 45
 				<div class="col-xs-4 pokemon-single">
46 46
 					<a href="pokemon/<?= $guardian; ?>">
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
 
51 51
 
52 52
 			<?php
53
-            } ?>
53
+			} ?>
54 54
 
55 55
 		</div>
56 56
 	</div>
57 57
 
58 58
 	<?php
59
-        }
60
-    }?>
59
+		}
60
+	}?>
61 61
 
62 62
 </div>
63 63
 
64 64
 <!-- auto hide buttons if no url is set in variables.json -->
65 65
 <?php if ($config->urls->fb_mystic || $config->urls->fb_valor || $config->urls->fb_instinct) {
66
-        ?>
66
+		?>
67 67
 <div class="row hidden-xs hiddem-sm area">
68 68
 	<div class="col-md-4">
69 69
 		<p align="center"><a href="<?= $config->urls->fb_mystic; ?>" target="_blank" class="btn btn-default"><i class="fa fa-facebook"></i> <?= $locales->TEAM; ?> <?= $locales->MYSTIC; ?></a></p>
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	</div>
79 79
 </div>
80 80
 <?php
81
-    } ?>
81
+	} ?>
82 82
 
83 83
 <div class="row">
84 84
 	<div class="col-md-12">
Please login to merge, or discard this patch.
pages/pokemon.page.php 1 patch
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 		<div class="col-sm-1 hidden-xs">
19 19
 
20 20
 				<?php if ($pokemon->id - 1 > 0) {
21
-    ?>
21
+	?>
22 22
 
23 23
 				<p class="nav-links"><a href="pokemon/<?= $pokemon->id - 1; ?>"><i class="fa fa-chevron-left"></i></a></p>
24 24
 
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
 		<div class="col-sm-1 hidden-xs">
45 45
 
46 46
 			<?php if ($pokemon->id + 1 < $config->system->max_pokemon) {
47
-        ?>
47
+		?>
48 48
 
49 49
 			<p class="nav-links"><a href="pokemon/<?= $pokemon->id + 1; ?>"><i class="fa fa-chevron-right"></i></a></p>
50 50
 
51 51
 			<?php
52
-    } ?>
52
+	} ?>
53 53
 		</div>
54 54
 
55 55
 	</div>
56 56
 <?php
57
-    $form_array = array('Unset', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'W', 'X', 'Y', 'Z');
58
-    $form_array = array_values($form_array);
59
-    ?>
57
+	$form_array = array('Unset', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'W', 'X', 'Y', 'Z');
58
+	$form_array = array_values($form_array);
59
+	?>
60 60
 
61 61
 </header>
62 62
 <!-- /Header -->
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
 
79 79
 				<p>
80 80
 				<?php foreach ($pokemon->types as $type) {
81
-        ?>
81
+		?>
82 82
 					<span class="label label-default" style="background-color:<?= $pokemons->typecolors->$type; ?>"><?= $type; ?></span>
83 83
 				<?php
84
-    }?>
84
+	}?>
85 85
 				</p>
86 86
 
87 87
 			</div>
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
 				<td class="col-md-4 col-xs-4">
111 111
 
112 112
 				<?php
113
-                if (isset($pokemon->last_position)) {
114
-                    ?>
113
+				if (isset($pokemon->last_position)) {
114
+					?>
115 115
 
116 116
 					<a href="https://maps.google.com/?q=<?= $pokemon->last_position->latitude; ?>,<?= $pokemon->last_position->longitude; ?>&ll=<?= $pokemon->last_position->latitude; ?>,<?= $pokemon->last_position->longitude; ?>&z=16" target="_blank"><?= time_ago($pokemon->last_seen, $locales); ?></a>
117 117
 
118 118
 				    <?php
119
-                } else {
120
-                    echo $locales->NEVER;
121
-                }
122
-                ?>
119
+				} else {
120
+					echo $locales->NEVER;
121
+				}
122
+				?>
123 123
 
124 124
 				</td>
125 125
 			</tr>
@@ -134,15 +134,15 @@  discard block
 block discarded – undo
134 134
 			<tr>
135 135
 				<td class="col-md-8 col-xs-8">
136 136
                     <?php
137
-                    if (isset($pokemon->protected_gyms)) {
138
-                        echo '<strong>'.$locales->POKEMON_GYM.$pokemon->name.'</strong>';
139
-                    } ?>
137
+					if (isset($pokemon->protected_gyms)) {
138
+						echo '<strong>'.$locales->POKEMON_GYM.$pokemon->name.'</strong>';
139
+					} ?>
140 140
                 </td>
141 141
 				<td class="col-md-4 col-xs-4">
142 142
                     <?php
143
-                    if (isset($pokemon->protected_gyms)) {
144
-                        echo $pokemon->protected_gyms;
145
-                    }?>
143
+					if (isset($pokemon->protected_gyms)) {
144
+						echo $pokemon->protected_gyms;
145
+					}?>
146 146
                 </td>
147 147
 			</tr>
148 148
 		</table>
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
 				<td class="col-md-4 col-xs-4">
158 158
 
159 159
                     <?php
160
-                    if (isset($pokemon->last_raid_position)) {
161
-                        ?>
160
+					if (isset($pokemon->last_raid_position)) {
161
+						?>
162 162
 
163 163
 					    <a href="https://maps.google.com/?q=<?= $pokemon->last_raid_position->latitude; ?>,<?= $pokemon->last_raid_position->longitude; ?>&ll=<?= $pokemon->last_raid_position->latitude; ?>,<?= $pokemon->last_raid_position->longitude; ?>&z=16" target="_blank"><?= time_ago($pokemon->last_raid_seen, $locales); ?></a>
164 164
 
165 165
 					    <?php
166
-                    } else {
167
-                        echo $locales->NEVER;
168
-                    }
169
-                    ?>
166
+					} else {
167
+						echo $locales->NEVER;
168
+					}
169
+					?>
170 170
 
171 171
 				</td>
172 172
 			</tr>
@@ -289,25 +289,25 @@  discard block
 block discarded – undo
289 289
 	<div class="col-md-12 flex-container-tree results">
290 290
 
291 291
 		<?php
292
-        $tree = array($pokemon->tree);
293
-        $depth = get_depth($tree);
294
-        $skip = false;
295
-        for ($i = 0; $i < $depth; ++$i) {
296
-            $i_id = intval(($i + 1) / 2);
297
-            $data = get_tree_at_depth($tree, $i_id, $config->system->max_pokemon); ?>
292
+		$tree = array($pokemon->tree);
293
+		$depth = get_depth($tree);
294
+		$skip = false;
295
+		for ($i = 0; $i < $depth; ++$i) {
296
+			$i_id = intval(($i + 1) / 2);
297
+			$data = get_tree_at_depth($tree, $i_id, $config->system->max_pokemon); ?>
298 298
 
299 299
 			<?php
300
-            if (!is_null($data) && 0 != sizeof($data) && !$skip) {
301
-                ?>
300
+			if (!is_null($data) && 0 != sizeof($data) && !$skip) {
301
+				?>
302 302
 				<div class="col-md-12 flex-item-tree">
303 303
 					<?php
304
-                    foreach ($data as $obj) {
305
-                        $obj_id = $obj->id;
306
-                        $tree_pokemon = $pokemons->pokemon->$obj_id;
307
-                        $link = 'pokemon/'.$obj_id;
304
+					foreach ($data as $obj) {
305
+						$obj_id = $obj->id;
306
+						$tree_pokemon = $pokemons->pokemon->$obj_id;
307
+						$link = 'pokemon/'.$obj_id;
308 308
 
309
-                        if (0 == $i % 2) {
310
-                            ?>
309
+						if (0 == $i % 2) {
310
+							?>
311 311
 
312 312
 							<div>
313 313
 								<a href="<?= $link; ?>"><img src="<?= $tree_pokemon->img; ?>" alt="<?= $tree_pokemon->name; ?>" class="img"></a>
@@ -315,42 +315,42 @@  discard block
 block discarded – undo
315 315
 							</div>
316 316
 
317 317
 						<?php
318
-                        } else {
319
-                            ?>
318
+						} else {
319
+							?>
320 320
 
321 321
 							<div>
322 322
 								<img src="core/img/arrow<?=$obj->array_sufix; ?>.png" alt="Arrow" class="img">
323 323
 								<p class="pkmn-name">
324 324
 									<?php
325
-                                    if (isset($obj->candies)) {
326
-                                        echo $obj->candies.' '.$locales->POKEMON_CANDIES;
327
-                                    } else {
328
-                                        echo '? '.$locales->POKEMON_CANDIES;
329
-                                    }
330
-
331
-                            if (isset($obj->item)) {
332
-                                $itemName = 'ITEM_'.$obj->item;
333
-                                echo '<br>+ '.$locales->$itemName;
334
-                            } elseif (isset($obj->info)) {
335
-                                $infoName = 'INFO_'.$obj->info;
336
-                                echo '<br>('.$locales->$infoName.')';
337
-                            } else {
338
-                                echo '<br> </br>';
339
-                            } ?>
325
+									if (isset($obj->candies)) {
326
+										echo $obj->candies.' '.$locales->POKEMON_CANDIES;
327
+									} else {
328
+										echo '? '.$locales->POKEMON_CANDIES;
329
+									}
330
+
331
+							if (isset($obj->item)) {
332
+								$itemName = 'ITEM_'.$obj->item;
333
+								echo '<br>+ '.$locales->$itemName;
334
+							} elseif (isset($obj->info)) {
335
+								$infoName = 'INFO_'.$obj->info;
336
+								echo '<br>('.$locales->$infoName.')';
337
+							} else {
338
+								echo '<br> </br>';
339
+							} ?>
340 340
 								</p>
341 341
 							</div>
342 342
                             <?php
343
-                        }
344
-                    } ?>
343
+						}
344
+					} ?>
345 345
                 </div>
346 346
             <?php
347
-            } elseif ($skip) {
348
-                $skip = false;
349
-            } else {
350
-                $skip = true;
351
-            }
352
-        }
353
-        ?>
347
+			} elseif ($skip) {
348
+				$skip = false;
349
+			} else {
350
+				$skip = true;
351
+			}
352
+		}
353
+		?>
354 354
 	</div>
355 355
 </div>
356 356
 
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 
366 366
 		<?php
367 367
 
368
-        foreach ($related as $related_mon) {
369
-            ?>
368
+		foreach ($related as $related_mon) {
369
+			?>
370 370
 
371 371
 			<div class="col-md-1 col-sm-2 col-xs-3 pokemon-single">
372 372
 
@@ -378,9 +378,9 @@  discard block
 block discarded – undo
378 378
 
379 379
 
380 380
 			<?php
381
-        }
381
+		}
382 382
 
383
-        ?>
383
+		?>
384 384
 
385 385
 		</div>
386 386
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
 
392 392
 <?php if (!empty($top)) {
393
-            ?>
393
+			?>
394 394
 	<div class="row area" id="top50">
395 395
 		<div class="col-md-12">
396 396
 			<h2 class="text-center sub-title">Top 50 <strong><?= $pokemon->name; ?></strong></h2>
@@ -408,20 +408,20 @@  discard block
 block discarded – undo
408 408
 							<th><a href="pokemon/<?= $pokemon->id; ?>?order=move_2<?php echo 'move_2' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50">2. <?= $locales->MOVE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
409 409
 							<th><a href="pokemon/<?= $pokemon->id; ?>?order=disappear_time<?php echo 'disappear_time' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50"><?= $locales->DATE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
410 410
 							<?php if (201 == $pokemon->id) {
411
-                ?>
411
+				?>
412 412
 								<th>Form</th>
413 413
 							<?php
414
-            } ?>
414
+			} ?>
415 415
 						</tr>
416 416
 					</thead>
417 417
 				
418 418
 					<tbody>
419 419
 						<?php
420
-                        $i = 0;
421
-            foreach ($top as $top50) {
422
-                ++$i;
423
-                $move1 = $top50->move_1;
424
-                $move2 = $top50->move_2; ?>
420
+						$i = 0;
421
+			foreach ($top as $top50) {
422
+				++$i;
423
+				$move1 = $top50->move_1;
424
+				$move2 = $top50->move_2; ?>
425 425
 
426 426
 							<tr>
427 427
 								<td><?= $i; ?></td>
@@ -435,17 +435,17 @@  discard block
 block discarded – undo
435 435
 								<td><a href="https://maps.google.com/?q=<?= $top50->latitude; ?>,<?= $top50->longitude; ?>&ll=<?= $top50->latitude; ?>,<?= $top50->longitude; ?>&z=16"
436 436
 									target="_blank"><?=$top50->distime; ?></a></td>
437 437
 								<?php if (201 == $pokemon->id && $top50->form) {
438
-                    ?>
438
+					?>
439 439
 									<td><?php echo $form_array[$top50->form]; ?></td>
440 440
 								<?php
441
-                } else {
442
-                    ?>
441
+				} else {
442
+					?>
443 443
 									<td></td>
444 444
 								<?php
445
-                } ?>
445
+				} ?>
446 446
 							</tr>
447 447
 							<?php
448
-            } ?>
448
+			} ?>
449 449
 				</tbody>
450 450
 			</table>
451 451
 		</div>
@@ -453,8 +453,8 @@  discard block
 block discarded – undo
453 453
 </div>
454 454
 
455 455
 <?php
456
-        } if ($toptrainer) {
457
-            ?>
456
+		} if ($toptrainer) {
457
+			?>
458 458
 	<div class="row" id="trainer">
459 459
 		<div class="col-md-12">
460 460
 			<h2 class="text-center sub-title"><?= $locales->POKEMON_TOPTRAINER; ?> <strong><?= $pokemon->name; ?></strong></h2>
@@ -473,11 +473,11 @@  discard block
 block discarded – undo
473 473
 					</thead>
474 474
 					<tbody>
475 475
 						<?php
476
-                        $i = 0;
477
-            foreach ($toptrainer as $besttrainer) {
478
-                ++$i;
479
-                $move1 = $besttrainer->move_1;
480
-                $move2 = $besttrainer->move_2; ?>
476
+						$i = 0;
477
+			foreach ($toptrainer as $besttrainer) {
478
+				++$i;
479
+				$move1 = $besttrainer->move_1;
480
+				$move2 = $besttrainer->move_2; ?>
481 481
 
482 482
 							<tr>
483 483
 								<td><?= $i; ?></td>
@@ -489,11 +489,11 @@  discard block
 block discarded – undo
489 489
 								<td><?=$besttrainer->lasttime; ?></td>
490 490
 							</tr>
491 491
 							<?php
492
-            } ?>
492
+			} ?>
493 493
 				</tbody>
494 494
 			</table>
495 495
 		</div>
496 496
 	</div>
497 497
 </div>
498 498
 <?php
499
-        } ?>
499
+		} ?>
Please login to merge, or discard this patch.
pages/pokestops.page.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@  discard block
 block discarded – undo
13 13
 <div class="row area">
14 14
 
15 15
 	<?php
16
-    if (true === !$config->system->no_lures) {
17
-        ?>
16
+	if (true === !$config->system->no_lures) {
17
+		?>
18 18
 		<div class="col-md-6 col-sm-6 col-xs-12 big-data" style="border-right:1px lightgray solid;"> <!-- POKESTOPS -->
19 19
 		<?php
20
-    } else {
21
-        ?>
20
+	} else {
21
+		?>
22 22
 		<div class="big-data"> <!-- POKESTOPS -->
23 23
 		<?php
24
-    }
25
-    ?>
24
+	}
25
+	?>
26 26
 		<img src="core/img/pokestop.png" alt="Pokestop" width=50 class="big-icon">
27 27
 		<p><big><strong><?= $pokestop->total; ?></strong> <?= $locales->POKESTOPS; ?></big><br> <?= sprintf($locales->INCITY, $config->infos->city); ?></p>
28 28
 	</div>
29 29
 
30 30
 	<?php
31
-    if (true === !$config->system->no_lures) {
32
-        ?>
31
+	if (true === !$config->system->no_lures) {
32
+		?>
33 33
 		<div class="col-md-6 col-sm-6 col-xs-12 big-data"> <!-- LURED STOPS -->
34 34
 		<img src="core/img/lure-module.png" alt="Lured Pokestop" width=50 class="big-icon">
35 35
 			<p><big><strong><?= $pokestop->lured; ?></strong> <?= $locales->LURES; ?></big><br> <?= $locales->POKESTOPS_LURES; ?></p>
36 36
 		</div>
37 37
 	<?php
38
-    }
39
-    ?>
38
+	}
39
+	?>
40 40
 </div>
41 41
 
42 42
 <?php
43 43
 if (true === !$config->system->no_lures) {
44
-        ?>
44
+		?>
45 45
 	<div class="row text-center subnav">
46 46
 		<div class="btn-group" role="group">
47 47
 		<a class="btn btn-default active" id="pokestopSelector"><i
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	</div>
51 51
 	</div>
52 52
 	<?php
53
-    }
53
+	}
54 54
 ?>
55 55
 
56 56
 <div class="row">
Please login to merge, or discard this patch.
config.example.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
 define('SYS_DEVELOPMENT_MODE', false);
31 31
 
32 32
 if ('' != directory()) {
33
-    $subdirectory = '/'.directory().'/';
33
+	$subdirectory = '/'.directory().'/';
34 34
 } else {
35
-    $subdirectory = '/';
35
+	$subdirectory = '/';
36 36
 }
37 37
 
38 38
 if (isset($_SERVER['HTTP_HOST'])) {
39
-    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
40
-        define('HOST_URL', $_SERVER['HTTP_X_FORWARDED_PROTO'].'://'.$_SERVER['HTTP_HOST'].$subdirectory);
41
-    } elseif (isset($_SERVER['REQUEST_SCHEME'])) {
42
-        define('HOST_URL', $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$subdirectory);
43
-    } else {
44
-        if (isset($_SERVER['HTTPS']) && 'on' == $_SERVER['HTTPS']) {
45
-            define('HOST_URL', 'https://'.$_SERVER['HTTP_HOST'].$subdirectory);
46
-        } else {
47
-            define('HOST_URL', 'http://'.$_SERVER['HTTP_HOST'].$subdirectory);
48
-        }
49
-    }
39
+	if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
40
+		define('HOST_URL', $_SERVER['HTTP_X_FORWARDED_PROTO'].'://'.$_SERVER['HTTP_HOST'].$subdirectory);
41
+	} elseif (isset($_SERVER['REQUEST_SCHEME'])) {
42
+		define('HOST_URL', $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$subdirectory);
43
+	} else {
44
+		if (isset($_SERVER['HTTPS']) && 'on' == $_SERVER['HTTPS']) {
45
+			define('HOST_URL', 'https://'.$_SERVER['HTTP_HOST'].$subdirectory);
46
+		} else {
47
+			define('HOST_URL', 'http://'.$_SERVER['HTTP_HOST'].$subdirectory);
48
+		}
49
+	}
50 50
 }
51 51
 
52 52
 //# Subdirectory trick
53 53
 function directory()
54 54
 {
55
-    //#https://stackoverflow.com/questions/2090723/how-to-get-the-relative-directory-no-matter-from-where-its-included-in-php
56
-    return substr(str_replace('\\', '/', realpath(dirname(__FILE__))), strlen(str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT']))) + 1);
55
+	//#https://stackoverflow.com/questions/2090723/how-to-get-the-relative-directory-no-matter-from-where-its-included-in-php
56
+	return substr(str_replace('\\', '/', realpath(dirname(__FILE__))), strlen(str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT']))) + 1);
57 57
 }
Please login to merge, or discard this patch.
install/tester.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -13,85 +13,85 @@
 block discarded – undo
13 13
 
14 14
 function php_test()
15 15
 {
16
-    $lock_msg = '';
16
+	$lock_msg = '';
17 17
 
18
-    if (version_compare(phpversion(), '5.4', '<')) {
19
-        $lock_msg .= "Error: Sorry, your PHP version isn't supported. Please upgrade to PHP >= 5.4<br>";
20
-    }
18
+	if (version_compare(phpversion(), '5.4', '<')) {
19
+		$lock_msg .= "Error: Sorry, your PHP version isn't supported. Please upgrade to PHP >= 5.4<br>";
20
+	}
21 21
 
22
-    return $lock_msg;
22
+	return $lock_msg;
23 23
 }
24 24
 
25 25
 function db_test()
26 26
 {
27
-    $manager = \Worldopole\QueryManager::current();
27
+	$manager = \Worldopole\QueryManager::current();
28 28
 
29
-    $lock_msg = '';
29
+	$lock_msg = '';
30 30
 
31
-    // Pokemon Test
32
-    $result = $manager->testTotalPokemon();
31
+	// Pokemon Test
32
+	$result = $manager->testTotalPokemon();
33 33
 
34
-    if (1 === $result) {
35
-        $lock_msg .= 'Error: No Pokémon database found<br>';
36
-    } elseif (2 === $result) {
37
-        $lock_msg .= 'Error: No Pokémon found is your database<br>';
38
-    }
34
+	if (1 === $result) {
35
+		$lock_msg .= 'Error: No Pokémon database found<br>';
36
+	} elseif (2 === $result) {
37
+		$lock_msg .= 'Error: No Pokémon found is your database<br>';
38
+	}
39 39
 
40
-    // Gym Test
41
-    $result = $manager->testTotalGyms();
40
+	// Gym Test
41
+	$result = $manager->testTotalGyms();
42 42
 
43
-    if (1 === $result) {
44
-        $lock_msg .= 'Error: No Gym database found<br>';
45
-    } elseif (2 === $result) {
46
-        $lock_msg .= 'Error: No Gym found is your database<br>';
47
-    }
43
+	if (1 === $result) {
44
+		$lock_msg .= 'Error: No Gym database found<br>';
45
+	} elseif (2 === $result) {
46
+		$lock_msg .= 'Error: No Gym found is your database<br>';
47
+	}
48 48
 
49
-    // Pokéstop Test
50
-    $result = $manager->testTotalPokestops();
49
+	// Pokéstop Test
50
+	$result = $manager->testTotalPokestops();
51 51
 
52
-    if (1 === $result) {
53
-        $lock_msg .= 'Error: No Pokestop database found<br>';
54
-    } elseif (2 === $result) {
55
-        $lock_msg .= 'Error: No Pokestop found in your database<br>';
56
-    }
52
+	if (1 === $result) {
53
+		$lock_msg .= 'Error: No Pokestop database found<br>';
54
+	} elseif (2 === $result) {
55
+		$lock_msg .= 'Error: No Pokestop found in your database<br>';
56
+	}
57 57
 
58
-    return $lock_msg;
58
+	return $lock_msg;
59 59
 }
60 60
 
61 61
 function permission_test()
62 62
 {
63
-    $lock_msg = '';
63
+	$lock_msg = '';
64 64
 
65
-    // Can we write on install and core/json folder?
66
-    if (!is_writable(SYS_PATH.'/install/') || !is_writeable(SYS_PATH.'/core/json/')) {
67
-        $lock_msg .= 'Error: Install can not be completed!<br>
65
+	// Can we write on install and core/json folder?
66
+	if (!is_writable(SYS_PATH.'/install/') || !is_writeable(SYS_PATH.'/core/json/')) {
67
+		$lock_msg .= 'Error: Install can not be completed!<br>
68 68
                               Please fix install/ and core/json/ directory rights.<br>
69 69
                               Apache needs write access to both directories.<br>';
70
-        // This is really bad exit immediately
71
-        echo $lock_msg;
72
-        exit();
73
-    }
70
+		// This is really bad exit immediately
71
+		echo $lock_msg;
72
+		exit();
73
+	}
74 74
 
75
-    return $lock_msg;
75
+	return $lock_msg;
76 76
 }
77 77
 
78 78
 function run_tests()
79 79
 {
80
-    // Execute tests
81
-    $errors = '';
82
-    $errors .= php_test();
83
-    $errors .= db_test();
84
-    $errors .= permission_test();
85
-
86
-    // Write lockfile on error
87
-    $lock_file = SYS_PATH.'/install/website.lock';
88
-    if (file_exists($lock_file)) {
89
-        // delete old lockfile
90
-        unlink($lock_file);
91
-    }
92
-
93
-    // create new file if there is an error
94
-    if ('' != $errors) {
95
-        file_put_contents($lock_file, $errors);
96
-    }
80
+	// Execute tests
81
+	$errors = '';
82
+	$errors .= php_test();
83
+	$errors .= db_test();
84
+	$errors .= permission_test();
85
+
86
+	// Write lockfile on error
87
+	$lock_file = SYS_PATH.'/install/website.lock';
88
+	if (file_exists($lock_file)) {
89
+		// delete old lockfile
90
+		unlink($lock_file);
91
+	}
92
+
93
+	// create new file if there is an error
94
+	if ('' != $errors) {
95
+		file_put_contents($lock_file, $errors);
96
+	}
97 97
 }
Please login to merge, or discard this patch.