Skip to content

Commit

Permalink
removed wordwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaswat975 committed May 31, 2024
1 parent 1966379 commit 98d6b45
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions webroot/api/notices/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@

require_once "../../../resources/autoload.php";

if (isset($_GET["line_wrap"])) {
$CHAR_WRAP = $_GET["line_wrap"];
} else {
$CHAR_WRAP = 80;
}

$notices = $SQL->getNotices();
$jsonArray = [];
foreach ($notices as $notice) {
$formattedNotice = [
"title" => $notice["title"],
"date" => date('m-d-Y', strtotime($notice["date"])),
"message" => wordwrap($notice["message"], $CHAR_WRAP)
"message" => $notice["message"]
];
$jsonArray[] = $formattedNotice;
}
Expand Down

0 comments on commit 98d6b45

Please sign in to comment.