Commit 26fd824b authored by Johannes's avatar Johannes

Improvements after code review.

parent 20aa9c99
Pipeline #45566126 passed with stages
in 7 minutes and 32 seconds
......@@ -183,7 +183,7 @@ class XhrMethods
$deleteAll = '';
if ($o['milestone'] == 2 && $this->storeGateway->isResponsible($this->session->id(), (int)$data['bid'])) {
$deleteAll = ' [ <a class="pdelete light" href="#p' . $o['id'] . '" onclick="u_delPost(' . $o['id'] . ', \'' . 'fs_betrieb_notiz' . '\',' . $data['bid'] . ');return false;" href="#p' . $o['id'] . '" class="pdelete light">X</a> ]';
$deleteAll = '<a class="pdelete light" href="#p' . $o['id'] . '" onclick="u_delPost(' . $o['id'] . ', \'' . 'fs_betrieb_notiz' . '\',' . $data['bid'] . ');return false;" href="#p' . $o['id'] . '" class="pdelete light"> <i class="fa fa-times" aria-hidden="true"></i></a>';
}
if ($o['milestone'] == 2 || $this->session->isOrgaTeam() || $this->func->fsId() == $o['fsid']) {
......@@ -206,7 +206,7 @@ class XhrMethods
$pic = 'img/milestone.png';
} elseif ($o['milestone'] == 2) {
$odd .= ' milestone';
$msg = '<span class="msg">' . $this->func->sv('accept_request', '<a href="/profile/' . (int)$o['fsid'] . '">' . $this->model->getVal('name', 'foodsaver', $o['fsid']) . '</a>') . $deleteAll;
$msg = '<span class="msg">' . $this->func->sv('accept_request', '<a href="/profile/' . (int)$o['fsid'] . '">' . $this->model->getVal('name', 'foodsaver', $o['fsid']) . '</a>') . $deleteAll . '</span>';
} elseif ($o['milestone'] == 3) {
$odd .= ' milestone';
$pic = 'img/milestone.png';
......@@ -1595,7 +1595,7 @@ class XhrMethods
$bezirkId = $this->forumGateway->getRegionForPost($data['pid']);
$bezirkType = $this->regionGateway->getType($bezirkId);
if ($this->session->isOrgaTeam() || $fsid == $this->func->fsId() || ($this->func->isBotFor($bezirkId) && $bezirkType == 7)) {
if ($this->session->isOrgaTeam() || $fsid == $this->session->id() || ($this->func->isBotFor($bezirkId) && $bezirkType == 7)) {
$this->forumGateway->deletePost($data['pid']);
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment