diff options
author | Bot <bot@myigel.name> | 2017-12-25 23:12:52 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-12-25 23:51:15 +0100 |
commit | 952c7892f3ac7bfadf8419062e44ff1af66ecc57 (patch) | |
tree | 69a85e8e4719801a064b8fa2d521fe000f959cd5 /includes/pages/user_news.php | |
parent | 879918864a9c6da0fe9be1aca6c443ec8df0afc3 (diff) |
Formatting & Docstrings
Diffstat (limited to 'includes/pages/user_news.php')
-rw-r--r-- | includes/pages/user_news.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index ba5ed53e..0ec93627 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -73,11 +73,12 @@ function user_meetings() /** * Renders the text content of a news entry - * + * * @param array $news * @return string HTML */ -function news_text($news) { +function news_text($news) +{ $text = ReplaceSmilies($news['Text']); $text = preg_replace("/\r\n\r\n/m", '<br><br>', $text); return $text; @@ -101,7 +102,11 @@ function display_news($news) $html .= '<div class="panel-footer text-muted">'; if (in_array('admin_news', $privileges)) { $html .= '<div class="pull-right">' - . button_glyph(page_link_to('admin_news', ['action' => 'edit', 'id' => $news['ID']]), 'edit', 'btn-xs') + . button_glyph( + page_link_to('admin_news', ['action' => 'edit', 'id' => $news['ID']]), + 'edit', + 'btn-xs' + ) . '</div>'; } $html .= '<span class="glyphicon glyphicon-time"></span> ' . date('Y-m-d H:i', $news['Datum']) . ' '; @@ -140,7 +145,11 @@ function user_news_comments() $nid = $request->input('nid'); $news = DB::selectOne('SELECT * FROM `News` WHERE `ID`=? LIMIT 1', [$nid]); if ($request->has('text')) { - $text = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', strip_tags($request->input('text'))); + $text = preg_replace( + "/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", + '', + strip_tags($request->input('text')) + ); DB::insert(' INSERT INTO `NewsComments` (`Refid`, `Datum`, `Text`, `UID`) VALUES (?, ?, ?, ?) |