diff --git a/app/public/actions/addsub.php b/app/public/actions/addsub.php index df448ed..9007390 100644 --- a/app/public/actions/addsub.php +++ b/app/public/actions/addsub.php @@ -4,7 +4,11 @@ $request = get_request($db, $_POST['rid']); $authorised_users = get_subscribers($db, $request); - $is_authorised = if ($_SESSION['uuid'] == $request['created_by']) {return true} else {return false}; + if ($_SESSION['uuid'] == $request['created_by']) { + $is_authorised = true; + } else { + $is_authorised = false; + }; // Add subscriber if ($is_authorised == true) { diff --git a/app/public/actions/delsub.php b/app/public/actions/delsub.php index f88787e..dade70c 100644 --- a/app/public/actions/delsub.php +++ b/app/public/actions/delsub.php @@ -4,7 +4,11 @@ $request = get_request($db, $_POST['rid']); $authorised_users = get_subscribers($db, $request); - $is_authorised = if ($_SESSION['uuid'] == $request['created_by']) {return true} else {return false}; + if ($_SESSION['uuid'] == $request['created_by']) { + $is_authorised = true; + } else { + $is_authorised = false; + }; if (!empty($_POST['delSubSelector'])) { $subs_to_remove = implode(",", $_POST['delSubSelector']); diff --git a/app/public/editsub.php b/app/public/editsub.php index 1280be6..83d6216 100644 --- a/app/public/editsub.php +++ b/app/public/editsub.php @@ -4,7 +4,11 @@ $request = get_request($db, $_GET['rid']); $authorised_users = get_subscribers($db, $request); - $is_authorised = if ($_SESSION['uuid'] == $request['created_by']) {return true} else {return false}; + if ($_SESSION['uuid'] == $request['created_by']) { + $is_authorised = true; + } else { + $is_authorised = false; + }; $all_users = get_all_users($db);