Browse Source

Merge branch '1.9.x' into C7309

aragonc 10 years ago
parent
commit
b268799ed1

+ 1 - 1
main/exercice/question_list_admin.inc.php

@@ -191,7 +191,7 @@ if (!$inATest) {
                     array(),
                     ICON_SIZE_SMALL
                 ).'</a>';
-
+                $delete_link = null;
 				if ($objExercise->edit_exercise_in_lp == true) {
 				     $delete_link = '<a id="delete_'.$id.'" class="opener"  href="'.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId.'&deleteQuestion='.$id.'" >'.Display::return_icon('delete.png',get_lang('RemoveFromTest'), array(), ICON_SIZE_SMALL).'</a>';
 				}

+ 3 - 0
main/inc/lib/document.lib.php

@@ -4273,6 +4273,7 @@ class DocumentManager
             try {
                 $ffmpeg = \FFMpeg\FFMpeg::create();
                 $video = $ffmpeg->open($wavFile);
+
                 $mp3File = str_replace('wav', 'mp3', $wavFile);
                 $result = $video->save(new FFMpeg\Format\Audio\Mp3(), $mp3File);
                 if ($result && $removeWavFileIfSuccess) {
@@ -4283,6 +4284,8 @@ class DocumentManager
                     return $mp3File;
                 }
             } catch (Exception $e) {
+                error_log($e->getMessage());
+                error_log($e->getPrevious()->getMessage());
             }
         }
         return false;

+ 3 - 3
main/messages/new_message.php

@@ -13,7 +13,7 @@
 * - send to specific user (when pressing send message in the who is online list)
 */
 // name of the language file that needs to be included
-$language_file= array('messages', 'userInfo', 'admin');
+$language_file = array('messages', 'userInfo', 'admin');
 $cidReset	= true;
 require_once '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
@@ -242,8 +242,8 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null) {
 			$file_comments	= $_POST['legend'];
 			$title 			= $default['title'];
 			$content 		= $default['content'];
-			$group_id		= $default['group_id'];
-			$parent_id 		= $default['parent_id'];
+			$group_id		= isset($default['group_id']) ? $default['group_id'] : null;
+			$parent_id 		= isset($default['parent_id']) ? $default['parent_id'] : null;
 			if (is_array($user_list) && count($user_list)> 0) {
 				//all is well, send the message
 				foreach ($user_list as $user) {