@@ -5,7 +5,7 @@ |
||
| 5 | 5 | |
| 6 | 6 | namespace Anax\View; |
| 7 | 7 | |
| 8 | -if (count($res3)>0) { ?> |
|
| 8 | +if (count($res3) > 0) { ?> |
|
| 9 | 9 | |
| 10 | 10 | <h3>Följande svar har skrivits av <?=$res->anvandarnamn?></h3> |
| 11 | 11 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | <?php foreach ($res as $row) : ?> |
| 45 | - <?php if ($row->type =="fraga") { ?> |
|
| 45 | + <?php if ($row->type == "fraga") { ?> |
|
| 46 | 46 | <div class="fragefalt"> |
| 47 | 47 | |
| 48 | 48 | <a href="<?=url("anvandare/anvandarid")?>/<?=$row->userid?>"> |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | <p><b><?=$row->title?></b></p> |
| 75 | 75 | <p><?=$textFilter->parse($row->data, "markdown")?></p> |
| 76 | 76 | |
| 77 | - <?php if (null!=($this->di->session->get("anvandarnamn"))) { ?> |
|
| 77 | + <?php if (null != ($this->di->session->get("anvandarnamn"))) { ?> |
|
| 78 | 78 | |
| 79 | 79 | <div id="svarknapp" class="skrivsvar"> |
| 80 | 80 | Skriv ett SVAR |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | </div> |
| 134 | 134 | <?php } ?> |
| 135 | 135 | |
| 136 | - <?php if ($row->type =="kommentar") { ?> |
|
| 136 | + <?php if ($row->type == "kommentar") { ?> |
|
| 137 | 137 | <div class="kommentarfalt"> |
| 138 | 138 | <a href="<?=url("anvandare/anvandarid")?>/<?=$row->userid?>"> |
| 139 | 139 | <img src='https://www.gravatar.com/avatar/<?php echo(md5(strtolower(trim($row->email)))) ?>?s=30&d=mp'> |
@@ -173,14 +173,14 @@ discard block |
||
| 173 | 173 | <?php } ?> |
| 174 | 174 | |
| 175 | 175 | |
| 176 | - <?php if ($row->type =="svar") { ?> |
|
| 176 | + <?php if ($row->type == "svar") { ?> |
|
| 177 | 177 | <div class="svarfalt"> |
| 178 | 178 | <a href="<?=url("anvandare/anvandarid")?>/<?=$row->userid?>"> |
| 179 | 179 | <img src='https://www.gravatar.com/avatar/<?php echo(md5(strtolower(trim($row->email)))) ?>?s=50&d=mp'> |
| 180 | 180 | </a> |
| 181 | 181 | <i>Postat <?=$row->published?> av <div id="user<?=$row->id?>" class="inl"> <?=$row->anvandarnamn?> </div></i> |
| 182 | 182 | |
| 183 | - <?php if ($row->godkant==false && $this->di->session->get("anvandarid")) { ?> |
|
| 183 | + <?php if ($row->godkant == false && $this->di->session->get("anvandarid")) { ?> |
|
| 184 | 184 | <form method="post" action='<?=url("inlagg/acceptera")?>/<?=$row->id?>'> |
| 185 | 185 | <input type="hidden" name="retursida" value="<?=$retursida?>"> |
| 186 | 186 | <br><div class="varning">Obs! Detta svar har ännu inte granskats och godkänts.</div> |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | <?php } ?> |
| 191 | 191 | |
| 192 | - <?php if ($row->godkant==false && $this->di->session->get("anvandarid")==null) { ?> |
|
| 192 | + <?php if ($row->godkant == false && $this->di->session->get("anvandarid") == null) { ?> |
|
| 193 | 193 | |
| 194 | 194 | |
| 195 | 195 | <div class="varning">Obs! Detta svar har ännu inte granskats och godkänts. <br>Inloggad kan du klicka här om du accepterar svaret.</div> |
@@ -199,11 +199,11 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | |
| 201 | 201 | |
| 202 | - <?php if ($row->godkant==true) { ?> |
|
| 202 | + <?php if ($row->godkant == true) { ?> |
|
| 203 | 203 | <br><div class="ok">Svaret är GODKÄNT</div> |
| 204 | 204 | <?php } ?> |
| 205 | 205 | |
| 206 | - <?php if ($row->godkant==true) { ?> |
|
| 206 | + <?php if ($row->godkant == true) { ?> |
|
| 207 | 207 | <div class="rankruta"> |
| 208 | 208 | <form method="post" action='<?=url("inlagg/rankauppinlagg")?>/<?=$row->id?>'> |
| 209 | 209 | <input type="hidden" name="retursida" value="<?=$retursida?>"> |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | <p><b><?=$row->title?></b></p> |
| 222 | 222 | <p><?=$textFilter->parse($row->data, "markdown")?></p> |
| 223 | 223 | |
| 224 | - <?php if (null!=($this->di->session->get("anvandarnamn"))) { ?> |
|
| 224 | + <?php if (null != ($this->di->session->get("anvandarnamn"))) { ?> |
|
| 225 | 225 | <div id="kommknapp<?=$row->id?>" class="skrivkommentar"> |
| 226 | 226 | Kommentera |
| 227 | 227 | </div> |
@@ -21,7 +21,6 @@ |
||
| 21 | 21 | * @param array $args as a variadic to catch all arguments. |
| 22 | 22 | * |
| 23 | 23 | * @throws Anax\Route\Exception\NotFoundException when route is not found. |
| 24 | - |
|
| 25 | 24 | * @return object as the response. |
| 26 | 25 | * |
| 27 | 26 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | * @param string $message with details. |
| 23 | 23 | * |
| 24 | 24 | * @throws Anax\Route\Exception\NotFoundException |
| 25 | - |
|
| 26 | 25 | * @return object as the response. |
| 27 | 26 | */ |
| 28 | 27 | public function catchAll() : object |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * Create a part of a table containing one type, one link, ordered by date or rank |
|
| 19 | - * |
|
| 20 | - * @param string $str the string to format as slug. |
|
| 21 | - * |
|
| 22 | - * @return str the formatted slug. |
|
| 23 | - */ |
|
| 18 | + * Create a part of a table containing one type, one link, ordered by date or rank |
|
| 19 | + * |
|
| 20 | + * @param string $str the string to format as slug. |
|
| 21 | + * |
|
| 22 | + * @return str the formatted slug. |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | public function hamtaTaggar($inlaggid) |
| 26 | 26 | { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | { |
| 49 | 49 | $db = $this->di->get("db"); |
| 50 | 50 | $db->connect(); |
| 51 | - $sql = "UPDATE anvandare2 SET " .$kategori. " = " .$kategori. " + " . $varde . " WHERE anvandarid = ?;"; |
|
| 51 | + $sql = "UPDATE anvandare2 SET " . $kategori . " = " . $kategori . " + " . $varde . " WHERE anvandarid = ?;"; |
|
| 52 | 52 | $db->execute($sql, [$id]); |
| 53 | 53 | return; |
| 54 | 54 | } |
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | - * Create a part of a table containing one type, one link, ordered by date or rank |
|
| 20 | - * |
|
| 21 | - * @param string $str the string to format as slug. |
|
| 22 | - * |
|
| 23 | - * @return str the formatted slug. |
|
| 24 | - */ |
|
| 19 | + * Create a part of a table containing one type, one link, ordered by date or rank |
|
| 20 | + * |
|
| 21 | + * @param string $str the string to format as slug. |
|
| 22 | + * |
|
| 23 | + * @return str the formatted slug. |
|
| 24 | + */ |
|
| 25 | 25 | public function postaNyKommentar($data, $userid, $tillhor, $type) |
| 26 | 26 | { |
| 27 | 27 | $db = $this->di->get("db"); |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * Create a part of a table containing one type, one link, ordered by date or rank |
|
| 19 | - * |
|
| 20 | - * @param string $str the string to format as slug. |
|
| 21 | - * |
|
| 22 | - * @return str the formatted slug. |
|
| 23 | - */ |
|
| 18 | + * Create a part of a table containing one type, one link, ordered by date or rank |
|
| 19 | + * |
|
| 20 | + * @param string $str the string to format as slug. |
|
| 21 | + * |
|
| 22 | + * @return str the formatted slug. |
|
| 23 | + */ |
|
| 24 | 24 | public function hamtaEnFraga($slug) |
| 25 | 25 | { |
| 26 | 26 | $db = $this->di->get("db"); |
@@ -31,10 +31,10 @@ |
||
| 31 | 31 | |
| 32 | 32 | //loopa i svaren och adda alla eventuella kommentarer |
| 33 | 33 | foreach ($svaren as $value) { |
| 34 | - array_push($res, $value);//lägger till själva svaren ett och ett |
|
| 34 | + array_push($res, $value); //lägger till själva svaren ett och ett |
|
| 35 | 35 | $kommentarerna = $this->hamtaren->hamtaKommentarer($value->id, $sortko); |
| 36 | 36 | foreach ($kommentarerna as $komvalue) { |
| 37 | - array_push($res, $komvalue);//lägger till kommentarer ett och ett |
|
| 37 | + array_push($res, $komvalue); //lägger till kommentarer ett och ett |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |