@@ -13,7 +13,9 @@ discard block |
||
| 13 | 13 | { |
| 14 | 14 | window.history.back(); |
| 15 | 15 | } |
| 16 | - <?php if(isset($includeEmojiAndAjax)){ ?> |
|
| 16 | + <?php if(isset($includeEmojiAndAjax)) |
|
| 17 | +{ |
|
| 18 | +?> |
|
| 17 | 19 | |
| 18 | 20 | function vote(postId, vote, obj) |
| 19 | 21 | { |
@@ -99,7 +101,9 @@ discard block |
||
| 99 | 101 | return {"lastPostId":lastPostId, "old_lastPostId":old_lastPostId}; |
| 100 | 102 | } |
| 101 | 103 | |
| 102 | - <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?> |
|
| 104 | + <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) |
|
| 105 | +{ |
|
| 106 | +?> |
|
| 103 | 107 | |
| 104 | 108 | if(window.location.hash) |
| 105 | 109 | { |
@@ -70,7 +70,8 @@ discard block |
||
| 70 | 70 | return TRUE; |
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | -function isUserAdmin() { |
|
| 73 | +function isUserAdmin() |
|
| 74 | +{ |
|
| 74 | 75 | global $config; |
| 75 | 76 | if (isset($_COOKIE['JodelAdminPassword']) && configPropertyExists($config, 'pw') && $config['pw'] == $_COOKIE['JodelAdminPassword']) |
| 76 | 77 | { |
@@ -121,7 +122,7 @@ discard block |
||
| 121 | 122 | } |
| 122 | 123 | |
| 123 | 124 | if(configPropertyExists($config, 'karmaDeviceUid')) |
| 124 | - { |
|
| 125 | + { |
|
| 125 | 126 | $jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']); |
| 126 | 127 | } |
| 127 | 128 | else |
@@ -194,7 +195,8 @@ discard block |
||
| 194 | 195 | |
| 195 | 196 | if(isset($_GET['view'])) |
| 196 | 197 | { |
| 197 | - switch ($_GET['view']) { |
|
| 198 | + switch ($_GET['view']) |
|
| 199 | + { |
|
| 198 | 200 | case 'discussed': |
| 199 | 201 | $view = 'discussed'; |
| 200 | 202 | break; |
@@ -34,7 +34,8 @@ discard block |
||
| 34 | 34 | * Compute HTML Code |
| 35 | 35 | */ |
| 36 | 36 | function jodelToHtml($post) |
| 37 | - { //ToDO |
|
| 37 | + { |
|
| 38 | +//ToDO |
|
| 38 | 39 | //Replace # with link |
| 39 | 40 | //preg_replace('~(\#)([^\s!,. /()"\'?]+)~', '<a href="tag/$2">#$2</a>', $text); |
| 40 | 41 | |
@@ -90,7 +91,8 @@ discard block |
||
| 90 | 91 | |
| 91 | 92 | echo '<img src="' . $post['image_url'] . '" alt="' . htmlspecialchars(preg_replace($regexRest, '', $post['message'])) . '">'; |
| 92 | 93 | } |
| 93 | - else { |
|
| 94 | + else |
|
| 95 | + { |
|
| 94 | 96 | echo str_replace(' ', ' ', nl2br(htmlspecialchars($post['message']))); |
| 95 | 97 | } |
| 96 | 98 | ?> |
@@ -116,15 +118,20 @@ discard block |
||
| 116 | 118 | <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s');?></span> |
| 117 | 119 | </span> |
| 118 | 120 | </span> |
| 119 | - <?php if(!$this->isDetailedView) {?> |
|
| 121 | + <?php if(!$this->isDetailedView) |
|
| 122 | +{ |
|
| 123 | +?> |
|
| 120 | 124 | <span class="comments"> |
| 121 | 125 | <span data-tooltip="Comments"> |
| 122 | 126 | <a href="<?php echo $this->changePostId($post['post_id'])->toUrl();?>"> |
| 123 | 127 | <i class="fa fa-commenting-o"></i> |
| 124 | 128 | <?php if(array_key_exists("child_count", $post)) |
| 125 | - { |
|
| 129 | +{ |
|
| 126 | 130 | echo $post["child_count"]; |
| 127 | - } else echo "0"; |
|
| 131 | + } |
|
| 132 | + else { |
|
| 133 | + echo "0"; |
|
| 134 | + } |
|
| 128 | 135 | ?> |
| 129 | 136 | </a> |
| 130 | 137 | </span> |
@@ -306,7 +313,7 @@ discard block |
||
| 306 | 313 | $data = $accountCreator->execute(); |
| 307 | 314 | } |
| 308 | 315 | if(array_key_exists('recent', $data) && array_key_exists(0, $data['recent'])) |
| 309 | - { |
|
| 316 | + { |
|
| 310 | 317 | return $data['recent']; |
| 311 | 318 | } |
| 312 | 319 | else if(array_key_exists('posts', $data)&& array_key_exists(0, $data['posts'])) |