[svn r15311] videoconf: fixing directory listing + file upload permission

skala
Arnaud Ligot 17 years ago
parent ba9af0a8fc
commit 7c89705d9d
  1. 4
      main/conference/api.php
  2. 8
      main/conference/checksession.php

@ -7,7 +7,7 @@
==============================================================================
*/
/*==== DEBUG ====*/
$debug=0;
$debug=255;
/*==== CONSTANTS ==== */
define('VIDEOCONF_UPLOAD_PATH', '/videoconf');
$presentation_extension = array('.ppt', '.odp');
@ -167,7 +167,7 @@ else if ($action == "service")
printf("<folders>");
// title filter
foreach (array_keys($files) as $k)
if (is_array($files)) foreach (array_keys($files) as $k)
{
// converting to UTF-8
$files[$k]['title'] = mb_convert_encoding(

@ -38,7 +38,11 @@ printf('</courseobject>');
printf('<userobject>');
foreach ($_SESSION['_user'] as $key => $val) if ($key != "auth_source") printf('<%s>%s</%s>',$key,utf8_encode($val),$key);
printf('<sid>%s</sid>', session_id());
$isadmin =((CourseManager::get_user_in_course_status($_SESSION['_user']['user_id'], $_SESSION['_course']['sysCode']) == COURSEMANAGER)||api_is_platform_admin() ? "true" : "false");
$isadmin =((CourseManager::get_user_in_course_status($_SESSION['_user']['user_id'], $_SESSION['_course']['sysCode']) == COURSEMANAGER)||
api_is_platform_admin() ||
api_is_course_tutor() ||
api_is_course_admin() ||
api_is_course_coach() ? "true" : "false");
printf('<key>%s</key>', md5($confkey.$challenge));
printf('<challenge>%s</challenge>', $challenge);
printf('<isUploadAllowed>%s</isUploadAllowed>', $isadmin);
@ -81,4 +85,4 @@ printf('<languageobject>');
printf(get_language_file_as_xml($language_interface));
printf('</languageobject>');
printf('</dokeosobject>');
?>
?>

Loading…
Cancel
Save