Skip to content

Commit

Permalink
Merge branch 'issue#3712' of git://github.com/yonathanrizky/OpenSID i…
Browse files Browse the repository at this point in the history
…nto yonathanrizky-issue#3712
  • Loading branch information
eddieridwan committed Oct 29, 2020
2 parents 6506e88 + 911c7d0 commit 8b52d10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions donjo-app/controllers/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ public function tab($cat = 0)

public function form($id = 0)
{
$cat = $this->session->kategori ?: 0;

if ( ! $this->web_artikel_model->boleh_ubah($id, $this->session->user)) redirect("web");
$cat = $this->session->kategori ? : 0;

if ($id)
{
$cek_data = $this->web_artikel_model->get_artikel($id);
if ( ! $cek_data) show_404();

if ( ! $this->web_artikel_model->boleh_ubah($id, $this->session->user)) redirect("web");

$this->session->kategori = $cek_data['id_kategori'];
$data['artikel'] = $cek_data;
$data['form_action'] = site_url("web/update/$id");
Expand Down

0 comments on commit 8b52d10

Please sign in to comment.