From 2bb51abfab7fe8a69bc35a5ffedf3146bc1cefcf Mon Sep 17 00:00:00 2001 From: David Van Wayenbergh Date: Thu, 13 Mar 2008 12:17:02 +0100 Subject: [PATCH] [svn r14588] * bug fixes with sessions in blog, forum, exercice --- main/blog/blog.php | 6 ++++++ main/blog/blog_admin.php | 5 +++++ main/exercice/exercice_submit.php | 6 +++++- main/exercice/exercise_result.php | 7 ++++++- main/forum/editpost.php | 3 +++ main/forum/iframe_thread.php | 5 +++++ main/forum/index.php | 5 +++++ main/forum/newthread.php | 6 +++++- main/forum/reply.php | 6 +++++- main/forum/viewforum.php | 5 +++++ main/forum/viewforumcategory.php | 5 +++++ main/forum/viewthread.php | 6 ++++++ 12 files changed, 61 insertions(+), 4 deletions(-) diff --git a/main/blog/blog.php b/main/blog/blog.php index b90651888e..74039dd3b2 100644 --- a/main/blog/blog.php +++ b/main/blog/blog.php @@ -40,6 +40,12 @@ $language_file = "blog"; $blog_id = intval($_GET['blog_id']); include ('../inc/global.inc.php'); +$this_section=SECTION_COURSES; + +/* ------------ ACCESS RIGHTS ------------ */ +// notice for unauthorized people. +api_protect_course_script(true); + //session if(isset($_GET['id_session'])) diff --git a/main/blog/blog_admin.php b/main/blog/blog_admin.php index d0a8991fee..ec2c9f2ab1 100644 --- a/main/blog/blog_admin.php +++ b/main/blog/blog_admin.php @@ -34,6 +34,11 @@ $language_file = "blog"; include('../inc/global.inc.php'); +$this_section=SECTION_COURSES; +/* ------------ ACCESS RIGHTS ------------ */ +// notice for unauthorized people. +api_protect_course_script(true); + require_once(api_get_path(LIBRARY_PATH) . "blog.lib.php"); $nameTools = get_lang("blog_management"); diff --git a/main/exercice/exercice_submit.php b/main/exercice/exercice_submit.php index 1debbdf190..6b6ef3dc1b 100644 --- a/main/exercice/exercice_submit.php +++ b/main/exercice/exercice_submit.php @@ -33,7 +33,7 @@ * the administrator * @package dokeos.exercise * @author Olivier Brouckaert -* @version $Id: exercice_submit.php 13476 2007-10-12 11:38:16Z elixir_inter $ +* @version $Id: exercice_submit.php 14588 2008-03-13 11:17:02Z vanwayenbergh $ */ @@ -61,6 +61,10 @@ $language_file='exercice'; include_once('../inc/global.inc.php'); $this_section=SECTION_COURSES; +/* ------------ ACCESS RIGHTS ------------ */ +// notice for unauthorized people. +api_protect_course_script(true); + include_once(api_get_path(LIBRARY_PATH).'text.lib.php'); $is_allowedToEdit=api_is_allowed_to_edit(); diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php index b7d568a956..558a49716e 100644 --- a/main/exercice/exercise_result.php +++ b/main/exercice/exercise_result.php @@ -25,7 +25,7 @@ * @package dokeos.exercise * @author Olivier Brouckaert, main author * @author Roan Embrechts, some refactoring -* @version $Id: exercise_result.php 14300 2008-02-15 11:40:43Z elixir_inter $ +* @version $Id: exercise_result.php 14588 2008-03-13 11:17:02Z vanwayenbergh $ * * @todo split more code up in functions, move functions to library? */ @@ -62,6 +62,11 @@ $language_file='exercice'; include('../inc/global.inc.php'); $this_section=SECTION_COURSES; + +/* ------------ ACCESS RIGHTS ------------ */ +// notice for unauthorized people. +api_protect_course_script(true); + include_once(api_get_path(LIBRARY_PATH).'events.lib.inc.php'); include_once(api_get_path(LIBRARY_PATH).'mail.lib.inc.php'); include_once(api_get_path(LIBRARY_PATH).'course.lib.php'); diff --git a/main/forum/editpost.php b/main/forum/editpost.php index 2108906b78..0db81375dd 100644 --- a/main/forum/editpost.php +++ b/main/forum/editpost.php @@ -66,6 +66,9 @@ require ('../inc/global.inc.php'); // the section (tabs) $this_section=SECTION_COURSES; +// notice for unauthorized people. +api_protect_course_script(true); + // FCKeditor configuration $fck_attribute['Width'] = '100%'; diff --git a/main/forum/iframe_thread.php b/main/forum/iframe_thread.php index 3e27fb1252..b2240baa8d 100644 --- a/main/forum/iframe_thread.php +++ b/main/forum/iframe_thread.php @@ -58,6 +58,11 @@ INIT SECTION ============================================================================== */ + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* ----------------------------------------------------------- Language Initialisation diff --git a/main/forum/index.php b/main/forum/index.php index 21c85733e6..3585434288 100644 --- a/main/forum/index.php +++ b/main/forum/index.php @@ -58,6 +58,11 @@ INIT SECTION ============================================================================== */ + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* ----------------------------------------------------------- Language Initialisation diff --git a/main/forum/newthread.php b/main/forum/newthread.php index 39e1da75ac..60655fed3b 100644 --- a/main/forum/newthread.php +++ b/main/forum/newthread.php @@ -58,7 +58,11 @@ INIT SECTION ============================================================================== */ - + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* diff --git a/main/forum/reply.php b/main/forum/reply.php index 618e59f640..f127d81fe2 100644 --- a/main/forum/reply.php +++ b/main/forum/reply.php @@ -59,7 +59,11 @@ INIT SECTION ============================================================================== */ - + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* ----------------------------------------------------------- diff --git a/main/forum/viewforum.php b/main/forum/viewforum.php index 3cf88160a1..ba3782de2f 100644 --- a/main/forum/viewforum.php +++ b/main/forum/viewforum.php @@ -58,6 +58,11 @@ INIT SECTION ============================================================================== */ + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* ----------------------------------------------------------- Language Initialisation diff --git a/main/forum/viewforumcategory.php b/main/forum/viewforumcategory.php index eca4b0dc54..12bc74ff77 100644 --- a/main/forum/viewforumcategory.php +++ b/main/forum/viewforumcategory.php @@ -58,6 +58,11 @@ INIT SECTION ============================================================================== */ + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* ----------------------------------------------------------- Language Initialisation diff --git a/main/forum/viewthread.php b/main/forum/viewthread.php index 30522acec8..1de487993c 100644 --- a/main/forum/viewthread.php +++ b/main/forum/viewthread.php @@ -58,6 +58,12 @@ INIT SECTION ============================================================================== */ + + include('../inc/global.inc.php'); + $this_section=SECTION_COURSES; + /* ------------ ACCESS RIGHTS ------------ */ + // notice for unauthorized people. + api_protect_course_script(true); /* ----------------------------------------------------------- Language Initialisation