From f8b6a06db403313a498045b2dcfe8f3ee15864c0 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 25 Sep 2013 11:43:15 +0200 Subject: [PATCH] Adding api_not_allowed --- main/work/download.php | 2 ++ main/work/view.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main/work/download.php b/main/work/download.php index ad59b3d70d..56b88e2201 100644 --- a/main/work/download.php +++ b/main/work/download.php @@ -93,5 +93,7 @@ if (!empty($course_info['real_id'])) { api_not_allowed(); } } +} else { + api_not_allowed(); } exit; diff --git a/main/work/view.php b/main/work/view.php index f5ee8fdd66..520e9343bb 100644 --- a/main/work/view.php +++ b/main/work/view.php @@ -41,6 +41,8 @@ if (user_is_author($id) || $course_info['show_score'] == 0 && $work['active'] == $tpl->assign('content', $content); $tpl->display_one_col_template(); } else { - api_not_allowed(); + api_not_allowed(true); } +} else { + api_not_allowed(true); }