Completed
Push — master ( 2d8c2c...83518f )
by mains
03:02
created
index.php 1 patch
Braces   +22 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
 		$posts[0] = $data;
22 22
 
23
-		if(array_key_exists('children', $data)) {
23
+		if(array_key_exists('children', $data))
24
+		{
24 25
 			foreach($data['children'] as $key => $child)
25 26
 			{
26 27
 				
@@ -83,7 +84,9 @@  discard block
 block discarded – undo
83 84
 							} ?>
84 85
 					</content>
85 86
 					
86
-					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
87
+					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
88
+{
89
+?>
87 90
 						<p id="loading">
88 91
 							Loading…
89 92
 						</p>
@@ -91,12 +94,20 @@  discard block
 block discarded – undo
91 94
 				</article>
92 95
 			
93 96
 				<aside class="topSidebar col-sm-4 sidebar-outer">
94
-					<div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile');?>">
97
+					<div class="fixed<?php if(!$view->isDetailedView)
98
+{
99
+	echo(' hide-mobile');
100
+}
101
+?>">
95 102
 						<article>
96 103
 							<div>
97 104
 								<h2>Position / Hashtag</h2>
98 105
 								<form action="index.php" method="get">
99
-									<input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required>
106
+									<input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus))
107
+{
108
+	echo $newPositionStatus;
109
+}
110
+?>" required>
100 111
 									<label>try: #jhj</label><br>
101 112
 									<input type="submit" value="Set Location" /> 
102 113
 								</form>
@@ -112,7 +123,9 @@  discard block
 block discarded – undo
112 123
 
113 124
 						<article>
114 125
 							<div>
115
-								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
126
+								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails']))
127
+{
128
+?>
116 129
 								<h2>Comment on Jodel</h2>
117 130
 								<form method="POST">				
118 131
 										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
@@ -120,7 +133,10 @@  discard block
 block discarded – undo
120 133
 									<br />
121 134
 									<input type="submit" value="SEND" /> 
122 135
 								</form>
123
-									<?php } else { ?>
136
+									<?php }
137
+else
138
+{
139
+?>
124 140
 								<h2>New Jodel</h2>
125 141
 								<form method="POST">
126 142
 									<textarea id="message" name="message" placeholder="Send a Jodel to all students within 10km" required></textarea> 
Please login to merge, or discard this patch.
php/DatabaseConnect.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,14 +13,18 @@
 block discarded – undo
13 13
 }
14 14
 $db = new DatabaseConnect();
15 15
 
16
-if($db->connect_errno == 1203)  // 1203 == ER_TOO_MANY_USER_CONNECTIONS (mysqld_error.h)
16
+if($db->connect_errno == 1203)
17
+{
18
+	// 1203 == ER_TOO_MANY_USER_CONNECTIONS (mysqld_error.h)
17 19
 {
18 20
 	error_log('ER_TOO_MANY_USER_CONNECTIONS');
21
+}
19 22
 	sleep(1);
20 23
 	header('location: '.$_SERVER['PHP_SELF']);
21 24
 }
22 25
 
23
-if ($db->connect_errno) {
26
+if ($db->connect_errno)
27
+{
24 28
   echo 'Sorry, die Verbindung zu unserem 
25 29
         Server ist hops gegangen. Wegen '. $db -> connect_error;
26 30
 }
Please login to merge, or discard this patch.