Passed
Pull Request — master (#295)
by René
03:22
created
templates/goto.tmpl.php 2 patches
Braces   +19 added lines, -7 removed lines patch added patch discarded remove patch
@@ -118,9 +118,12 @@  discard block
 block discarded – undo
118 118
 				<span class="symbol icon-settings"></span>
119 119
 				<?php if (count($comments)) : ?>
120 120
 					<div id="comment-counter" class="badge"><?php p(count($comments)) ?></div>
121
-				<?php else: ?>
121
+				<?php else {
122
+	: ?>
122 123
 					<div id="comment-counter" class="badge no-comments"><?php p(count($comments)) ?></div>
123
-				<?php endif; ?>
124
+				<?php endif;
125
+}
126
+?>
124 127
 			</a>
125 128
 		</div>
126 129
 
@@ -333,7 +336,10 @@  discard block
 block discarded – undo
333 336
 				</div>
334 337
 			<?php if (User::isLoggedIn()) : ?>
335 338
 				<div class="notification">
336
-					<input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) print_unescaped(' checked'); ?> />
339
+					<input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) {
340
+	print_unescaped(' checked');
341
+}
342
+?> />
337 343
 					<label for="check_notif"><?php p($l->t('Receive notification email on activity')); ?></label>
338 344
 				</div>
339 345
 			<?php endif; ?>
@@ -431,8 +437,11 @@  discard block
 block discarded – undo
431 437
 						<div class="author"><?php p($userMgr->get($userId)->getDisplayName()) ?></div>
432 438
 					</div>
433 439
 
434
-				<?php else: ?>
435
-					<a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); ?>"><?php p($l->t('Login or ...')); ?></a>
440
+				<?php else {
441
+	: ?>
442
+					<a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
443
+}
444
+?>"><?php p($l->t('Login or ...')); ?></a>
436 445
 					<div class="authorRow user-cell flex-row">
437 446
 						<div class="avatar has-tooltip" title="?"></div>
438 447
 						<div id="id_ac_detected" class="author  flex-column external">
@@ -453,9 +462,12 @@  discard block
 block discarded – undo
453 462
 
454 463
 				<?php if ($comments == null) : ?>
455 464
 					<li id="no-comments" class="emptycontent">
456
-				<?php else : ?>
465
+				<?php else {
466
+	: ?>
457 467
 					<li id="no-comments" class="emptycontent hidden">
458
-				<?php endif; ?>
468
+				<?php endif;
469
+}
470
+?>
459 471
 
460 472
 						<div class="icon-comment"></div>
461 473
 						<p><?php p($l->t('No comments yet. Be the first.')); ?></p>
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		$poll->getDescription() !== null &&
82 82
 		$poll->getDescription() !== ''
83 83
 	) {
84
-		$description = str_replace(array('\r\n', '\r', '\n') , '<br/>', htmlspecialchars($poll->getDescription()));
84
+		$description = str_replace(array('\r\n', '\r', '\n'), '<br/>', htmlspecialchars($poll->getDescription()));
85 85
 	} else {
86 86
 		$description = $l->t('No description provided.');
87 87
 	}
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
 								print_unescaped('<li id="slot_' . $dateElement->getId() . '" title="' . $dateElement->getDt() . ' ' . date_default_timezone_get() . '" class="flex-column vote time has-tooltip" data-timestamp="' . $timestamp . '"data-value-utc="' . $dateElement->getDt() . '">');
141 141
 
142 142
 								print_unescaped('	<div class="date-box flex-column">');
143
-								print_unescaped('		<div class="month">' . $l->t(date('M', $timestamp))  . '</div>');
144
-								print_unescaped('		<div class="day">'   .       date('j', $timestamp)   . '</div>');
145
-								print_unescaped('		<div class="dayow">' . $l->t(date('D', $timestamp))  . '</div>');
146
-								print_unescaped('		<div class="time">'  .       date('G:i', $timestamp) . ' UTC</div>');
143
+								print_unescaped('		<div class="month">' . $l->t(date('M', $timestamp)) . '</div>');
144
+								print_unescaped('		<div class="day">' . date('j', $timestamp) . '</div>');
145
+								print_unescaped('		<div class="dayow">' . $l->t(date('D', $timestamp)) . '</div>');
146
+								print_unescaped('		<div class="time">' . date('G:i', $timestamp) . ' UTC</div>');
147 147
 								print_unescaped('	</div>');
148 148
 							} else {
149 149
 								print_unescaped('<li id="slot_' . $dateElement->getId() . '" title="' . preg_replace('/_\d+$/', '', $dateElement->getText()) . '" class="flex-column vote option">');
150
-								print_unescaped('	<div class="date-box flex-column">' . preg_replace('/_\d+$/', '', $dateElement->getText()).'</div>');
150
+								print_unescaped('	<div class="date-box flex-column">' . preg_replace('/_\d+$/', '', $dateElement->getText()) . '</div>');
151 151
 							}
152 152
 							print_unescaped('<div class="counter flex-row">');
153 153
 							print_unescaped('	<div class="yes flex-row">');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 							if (!isset($others[$vote->getUserId()])) {
176 176
 								$others[$vote->getUserId()] = array();
177 177
 							}
178
-							$others[$vote->getUserId()][]= $vote;
178
+							$others[$vote->getUserId()][] = $vote;
179 179
 						}
180 180
 						$userCnt = 0;
181 181
 						foreach (array_keys($others) as $usr) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 										break;
248 248
 									}
249 249
 								}
250
-								print_unescaped('<li id="'. $pollId . '" class="' . $class . '"></li>');
250
+								print_unescaped('<li id="' . $pollId . '" class="' . $class . '"></li>');
251 251
 								$i_tot++;
252 252
 							}
253 253
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 						print_unescaped('	<div class="flex-row first">');
264 264
 						print_unescaped('		<div class="user-cell flex-row">');
265 265
 						if (User::isLoggedIn()) {
266
-							print_unescaped('		<div class="avatar has-tooltip" title="'.($userId).'"></div>');
266
+							print_unescaped('		<div class="avatar has-tooltip" title="' . ($userId) . '"></div>');
267 267
 							print_unescaped('		<div class="name">');
268 268
 							p($userMgr->get($userId)->getDisplayName());
269 269
 						} else {
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 						}
273 273
 						print_unescaped('		</div>');
274 274
 						print_unescaped('	</div>');
275
-						print_unescaped('	<div id="toggle-cell" class="toggle-cell has-tooltip maybe" title="'. $toggleTooltip .'">');
275
+						print_unescaped('	<div id="toggle-cell" class="toggle-cell has-tooltip maybe" title="' . $toggleTooltip . '">');
276 276
 						print_unescaped('		<div class="toggle"></div>');
277 277
 						print_unescaped('	</div>');
278 278
 						print_unescaped('</div>');
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 							if (isset($userVoted)) {
294 294
 								foreach ($userVoted as $obj) {
295 295
 									$voteVal = null;
296
-									if($poll->getType() === 0) {
296
+									if ($poll->getType() === 0) {
297 297
 										$voteVal = strtotime($obj->getDt());
298 298
 									} else {
299 299
 										$voteVal = $obj->getText();
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 										if ($obj->getType() === 1) {
303 303
 											$class = 'yes';
304 304
 											$total['yes'][$i_tot]++;
305
-										} else if($obj->getType() === 2) {
305
+										} else if ($obj->getType() === 2) {
306 306
 											$class = 'maybe';
307 307
 										}
308 308
 										break;
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 	
345 345
 	<div id="app-sidebar" class="detailsView scroll-container disappear">
346 346
 		<div class="close flex-row">
347
-			<a id="closeDetails" class="close icon-close has-tooltip-bottom" title="<?php p($l->t('Close details')); ?>" href="#" alt="<?php $l->t('Close');?>"></a>
347
+			<a id="closeDetails" class="close icon-close has-tooltip-bottom" title="<?php p($l->t('Close details')); ?>" href="#" alt="<?php $l->t('Close'); ?>"></a>
348 348
 		</div>
349 349
 
350 350
 		<div class="header flex-row">
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
 				<div class="cloud">
359 359
 					<?php
360 360
 					if ($expired) {
361
-						print_unescaped('<span class="expired">' . $l->t('Expired'). '</span>');
361
+						print_unescaped('<span class="expired">' . $l->t('Expired') . '</span>');
362 362
 					} else {
363
-						if ($poll->getExpire() !== null){
363
+						if ($poll->getExpire() !== null) {
364 364
 							print_unescaped('<span class="open">' . $l->t('Expires on %s', array(date('d.m.Y', strtotime($poll->getExpire())))) . '</span>');
365 365
 						} else {
366 366
 							print_unescaped('<span class="open">' . $l->t('Expires never') . '</span>');
@@ -464,13 +464,13 @@  discard block
 block discarded – undo
464 464
 				<?php foreach ($comments as $comment) : ?>
465 465
 
466 466
 					<?php
467
-						if ( $comment->getUserId() === $userId ) {
467
+						if ($comment->getUserId() === $userId) {
468 468
 							// Comment is from current user
469 469
 							// -> display user
470 470
 							$avatarName = $userId;
471 471
 							$displayName = $userMgr->get($userId)->getDisplayName();
472 472
 
473
-						} else if ( !$isAnonymous && !$hideNames ) {
473
+						} else if (!$isAnonymous && !$hideNames) {
474 474
 							// comment is from another user,
475 475
 							// poll is not anoymous (for current user)
476 476
 							// users are not hidden
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 						<div class="authorRow user-cell flex-row">
495 495
 							<div class="avatar has-tooltip" title="<?php p($avatarName)?>"></div>
496 496
 							<div class="author"><?php p($displayName) ?></div>
497
-							<div class="date has-tooltip live-relative-timestamp datespan" data-timestamp="<?php p(strtotime($comment->getDt())*1000); ?>" title="<?php p($comment->getDt()) ?>"><?php p(\OCP\Template::relative_modified_date(strtotime($comment->getDt()))) ?></div>
497
+							<div class="date has-tooltip live-relative-timestamp datespan" data-timestamp="<?php p(strtotime($comment->getDt()) * 1000); ?>" title="<?php p($comment->getDt()) ?>"><?php p(\OCP\Template::relative_modified_date(strtotime($comment->getDt()))) ?></div>
498 498
 						</div>
499 499
 						<div class="message wordwrap comment-content"><?php p($comment->getComment()); ?></div>
500 500
 					</li>
Please login to merge, or discard this patch.