@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $folder = api_get_unique_id(); |
46 | - $destinationDir = api_get_path(SYS_ARCHIVE_PATH) . $folder; |
|
46 | + $destinationDir = api_get_path(SYS_ARCHIVE_PATH).$folder; |
|
47 | 47 | $coursePath = api_get_course_path(); |
48 | 48 | $sessionId = api_get_session_id(); |
49 | 49 | $groupId = api_get_group_id(); |
50 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $coursePath . '/document'; |
|
50 | + $documentPath = api_get_path(SYS_COURSE_PATH).$coursePath.'/document'; |
|
51 | 51 | $courseInfo = api_get_course_info(); |
52 | 52 | |
53 | 53 | mkdir($destinationDir, api_get_permissions_for_new_directories(), true); |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | if ($weighting > 0) { |
818 | 818 | $questionWeighting += $weighting; |
819 | 819 | } |
820 | - $goodAnswer = $correct ? true : false; |
|
820 | + $goodAnswer = $correct ? true : false; |
|
821 | 821 | |
822 | 822 | $this->fixPathInText($importedFiles, $answer); |
823 | 823 | |
@@ -854,7 +854,7 @@ discard block |
||
854 | 854 | if ($weighting > 0) { |
855 | 855 | $questionWeighting += $weighting; |
856 | 856 | } |
857 | - $goodAnswer = $correct ? true : false; |
|
857 | + $goodAnswer = $correct ? true : false; |
|
858 | 858 | |
859 | 859 | $this->fixPathInText($importedFiles, $answer); |
860 | 860 | |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | $answer['questiontext'] |
956 | 956 | ); |
957 | 957 | |
958 | - $placeholder .= '<p> ' . strip_tags($answer['questiontext']).' '.$currentAnswers . ' </p>'; |
|
958 | + $placeholder .= '<p> '.strip_tags($answer['questiontext']).' '.$currentAnswers.' </p>'; |
|
959 | 959 | } |
960 | 960 | |
961 | 961 | return $optionsValues; |
@@ -193,9 +193,9 @@ |
||
193 | 193 | /* File case */ |
194 | 194 | if (is_file($source)) { |
195 | 195 | if ($forceMove && !$isWindowsOS && $canExec) { |
196 | - exec('mv ' . $source . ' ' . $target . '/' . $file_name); |
|
196 | + exec('mv '.$source.' '.$target.'/'.$file_name); |
|
197 | 197 | } else { |
198 | - copy($source, $target . '/' . $file_name); |
|
198 | + copy($source, $target.'/'.$file_name); |
|
199 | 199 | unlink($source); |
200 | 200 | } |
201 | 201 | return true; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | // General parameters passed via POST/GET |
36 | 36 | if ($debug) { |
37 | - error_log('Entered exercise_result.php: ' . print_r($_POST, 1)); |
|
37 | + error_log('Entered exercise_result.php: '.print_r($_POST, 1)); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | if (empty($formSent)) { |
@@ -131,19 +131,19 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | if (!empty($gradebook) && $gradebook == 'view') { |
134 | - $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook')); |
|
134 | + $interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook')); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | $fromlink = ''; |
138 | 138 | |
139 | -$interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises')); |
|
140 | -$interbreadcrumb[] = array("url" => "overview.php?exerciseId=" . $exercise_id . '&' . api_get_cidreq(), "name" => $objExercise->name); |
|
139 | +$interbreadcrumb[] = array("url" => "exercise.php?".api_get_cidreq(), "name" => get_lang('Exercises')); |
|
140 | +$interbreadcrumb[] = array("url" => "overview.php?exerciseId=".$exercise_id.'&'.api_get_cidreq(), "name" => $objExercise->name); |
|
141 | 141 | $interbreadcrumb[] = array("url" => "#", "name" => get_lang('Result')); |
142 | 142 | |
143 | 143 | $this_section = SECTION_COURSES; |
144 | 144 | |
145 | -$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">'; |
|
146 | -$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>'; |
|
145 | +$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_JS_PATH).'hotspot/css/hotspot.css">'; |
|
146 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'hotspot/js/hotspot.js"></script>'; |
|
147 | 147 | |
148 | 148 | if ($origin != 'learnpath') { |
149 | 149 | Display::display_header(''); |
@@ -269,29 +269,29 @@ discard block |
||
269 | 269 | $i = $totalScore = $totalWeighting = 0; |
270 | 270 | |
271 | 271 | if ($debug > 0) { |
272 | - error_log("ExerciseResult: " . print_r($exerciseResult, 1)); |
|
273 | - error_log("QuestionList: " . print_r($questionList, 1)); |
|
272 | + error_log("ExerciseResult: ".print_r($exerciseResult, 1)); |
|
273 | + error_log("QuestionList: ".print_r($questionList, 1)); |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | $arrques = array(); |
277 | 277 | $arrans = array(); |
278 | 278 | |
279 | -$user_restriction = $is_allowedToEdit ? '' : "AND user_id=" . intval($student_id) . " "; |
|
279 | +$user_restriction = $is_allowedToEdit ? '' : "AND user_id=".intval($student_id)." "; |
|
280 | 280 | $sql = "SELECT attempts.question_id, answer |
281 | 281 | FROM $TBL_TRACK_ATTEMPT as attempts |
282 | - INNER JOIN " . $TBL_TRACK_EXERCISES . " AS stats_exercises |
|
282 | + INNER JOIN ".$TBL_TRACK_EXERCISES." AS stats_exercises |
|
283 | 283 | ON stats_exercises.exe_id=attempts.exe_id |
284 | 284 | INNER JOIN $TBL_EXERCISE_QUESTION AS quizz_rel_questions |
285 | 285 | ON |
286 | 286 | quizz_rel_questions.exercice_id=stats_exercises.exe_exo_id AND |
287 | 287 | quizz_rel_questions.question_id = attempts.question_id AND |
288 | - quizz_rel_questions.c_id=" . api_get_course_int_id() . " |
|
289 | - INNER JOIN " . $TBL_QUESTIONS . " AS questions |
|
288 | + quizz_rel_questions.c_id=".api_get_course_int_id()." |
|
289 | + INNER JOIN " . $TBL_QUESTIONS." AS questions |
|
290 | 290 | ON |
291 | 291 | questions.id=quizz_rel_questions.question_id AND |
292 | - questions.c_id = " . api_get_course_int_id() . " |
|
292 | + questions.c_id = " . api_get_course_int_id()." |
|
293 | 293 | WHERE |
294 | - attempts.exe_id = " . intval($id) . " $user_restriction |
|
294 | + attempts.exe_id = " . intval($id)." $user_restriction |
|
295 | 295 | GROUP BY quizz_rel_questions.question_order, attempts.question_id"; |
296 | 296 | |
297 | 297 | $result = Database::query($sql); |
@@ -520,26 +520,26 @@ discard block |
||
520 | 520 | $table_resume = '<table class="data_table"> |
521 | 521 | <tr class="row_odd" > |
522 | 522 | <td></td> |
523 | - <td ><b>' . get_lang('Requirements') . '</b></td> |
|
524 | - <td><b>' . get_lang('YourAnswer') . '</b></td> |
|
523 | + <td ><b>' . get_lang('Requirements').'</b></td> |
|
524 | + <td><b>' . get_lang('YourAnswer').'</b></td> |
|
525 | 525 | </tr> |
526 | 526 | |
527 | 527 | <tr class="row_even"> |
528 | - <td><b>' . get_lang('Overlap') . '</b></td> |
|
529 | - <td>' . get_lang('Min') . ' ' . $threadhold1 . '</td> |
|
530 | - <td><div style="color:' . $overlap_color . '">' . (($final_overlap < 0) ? 0 : intval($final_overlap)) . '</div></td> |
|
528 | + <td><b>' . get_lang('Overlap').'</b></td> |
|
529 | + <td>' . get_lang('Min').' '.$threadhold1.'</td> |
|
530 | + <td><div style="color:' . $overlap_color.'">'.(($final_overlap < 0) ? 0 : intval($final_overlap)).'</div></td> |
|
531 | 531 | </tr> |
532 | 532 | |
533 | 533 | <tr> |
534 | - <td><b>' . get_lang('Excess') . '</b></td> |
|
535 | - <td>' . get_lang('Max') . ' ' . $threadhold2 . '</td> |
|
536 | - <td><div style="color:' . $excess_color . '">' . (($final_excess < 0) ? 0 : intval($final_excess)) . '</div></td> |
|
534 | + <td><b>' . get_lang('Excess').'</b></td> |
|
535 | + <td>' . get_lang('Max').' '.$threadhold2.'</td> |
|
536 | + <td><div style="color:' . $excess_color.'">'.(($final_excess < 0) ? 0 : intval($final_excess)).'</div></td> |
|
537 | 537 | </tr> |
538 | 538 | |
539 | 539 | <tr class="row_even"> |
540 | - <td><b>' . get_lang('Missing') . '</b></td> |
|
541 | - <td>' . get_lang('Max') . ' ' . $threadhold3 . '</td> |
|
542 | - <td><div style="color:' . $missing_color . '">' . (($final_missing < 0) ? 0 : intval($final_missing)) . '</div></td> |
|
540 | + <td><b>' . get_lang('Missing').'</b></td> |
|
541 | + <td>' . get_lang('Max').' '.$threadhold3.'</td> |
|
542 | + <td><div style="color:' . $missing_color.'">'.(($final_missing < 0) ? 0 : intval($final_missing)).'</div></td> |
|
543 | 543 | </tr></table>'; |
544 | 544 | |
545 | 545 | if ($answerType != HOT_SPOT_DELINEATION) { |
@@ -563,25 +563,25 @@ discard block |
||
563 | 563 | } |
564 | 564 | } |
565 | 565 | |
566 | - echo '<h1><div style="color:#333;">' . get_lang('Feedback') . '</div></h1>'; |
|
566 | + echo '<h1><div style="color:#333;">'.get_lang('Feedback').'</div></h1>'; |
|
567 | 567 | if ($answerType == HOT_SPOT_DELINEATION) { |
568 | 568 | if ($organs_at_risk_hit > 0) { |
569 | - $message = '<br />' . get_lang('ResultIs') . ' <b>' . $result_comment . '</b><br />'; |
|
570 | - $message .= '<p style="color:#DC0A0A;"><b>' . get_lang('OARHit') . '</b></p>'; |
|
569 | + $message = '<br />'.get_lang('ResultIs').' <b>'.$result_comment.'</b><br />'; |
|
570 | + $message .= '<p style="color:#DC0A0A;"><b>'.get_lang('OARHit').'</b></p>'; |
|
571 | 571 | } else { |
572 | - $message = '<p>' . get_lang('YourDelineation') . '</p>'; |
|
572 | + $message = '<p>'.get_lang('YourDelineation').'</p>'; |
|
573 | 573 | $message .= $table_resume; |
574 | - $message .= '<br />' . get_lang('ResultIs') . ' <b>' . $result_comment . '</b><br />'; |
|
574 | + $message .= '<br />'.get_lang('ResultIs').' <b>'.$result_comment.'</b><br />'; |
|
575 | 575 | } |
576 | - $message .= '<p>' . $comment . '</p>'; |
|
576 | + $message .= '<p>'.$comment.'</p>'; |
|
577 | 577 | echo $message; |
578 | 578 | } else { |
579 | - echo '<p>' . $comment . '</p>'; |
|
579 | + echo '<p>'.$comment.'</p>'; |
|
580 | 580 | } |
581 | 581 | |
582 | 582 | //showing the score |
583 | - $queryfree = "SELECT marks from " . $TBL_TRACK_ATTEMPT . " |
|
584 | - WHERE exe_id = " . intval($id) . " AND question_id= " . intval($questionId) . ""; |
|
583 | + $queryfree = "SELECT marks from ".$TBL_TRACK_ATTEMPT." |
|
584 | + WHERE exe_id = " . intval($id)." AND question_id= ".intval($questionId).""; |
|
585 | 585 | $resfree = Database::query($queryfree); |
586 | 586 | $questionScore = Database::result($resfree, 0, "marks"); |
587 | 587 | $totalScore += $questionScore; |
@@ -637,8 +637,8 @@ discard block |
||
637 | 637 | $marksname = ''; |
638 | 638 | |
639 | 639 | if ($isFeedbackAllowed) { |
640 | - $name = "fckdiv" . $questionId; |
|
641 | - $marksname = "marksName" . $questionId; |
|
640 | + $name = "fckdiv".$questionId; |
|
641 | + $marksname = "marksName".$questionId; |
|
642 | 642 | if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) { |
643 | 643 | $url_name = get_lang('EditCommentsAndMarks'); |
644 | 644 | } else { |
@@ -649,32 +649,32 @@ discard block |
||
649 | 649 | } |
650 | 650 | } |
651 | 651 | echo '<br />'; |
652 | - echo Display::url($url_name, 'javascript://', array('class' => 'btn', 'onclick' => "showfck('" . $name . "', '" . $marksname . "');")); |
|
652 | + echo Display::url($url_name, 'javascript://', array('class' => 'btn', 'onclick' => "showfck('".$name."', '".$marksname."');")); |
|
653 | 653 | echo '<br />'; |
654 | 654 | |
655 | - echo '<div id="feedback_' . $name . '" style="width:100%">'; |
|
655 | + echo '<div id="feedback_'.$name.'" style="width:100%">'; |
|
656 | 656 | $comnt = trim(Event::get_comments($id, $questionId)); |
657 | 657 | if (empty($comnt)) { |
658 | 658 | echo '<br />'; |
659 | 659 | } else { |
660 | - echo '<div id="question_feedback">' . $comnt . '</div>'; |
|
660 | + echo '<div id="question_feedback">'.$comnt.'</div>'; |
|
661 | 661 | } |
662 | 662 | echo '</div>'; |
663 | 663 | |
664 | - echo '<div id="' . $name . '" style="display:none">'; |
|
664 | + echo '<div id="'.$name.'" style="display:none">'; |
|
665 | 665 | $arrid[] = $questionId; |
666 | - $feedback_form = new FormValidator('frmcomments' . $questionId, 'post', ''); |
|
666 | + $feedback_form = new FormValidator('frmcomments'.$questionId, 'post', ''); |
|
667 | 667 | $feedback_form->addElement('html', '<br>'); |
668 | - $renderer =& $feedback_form->defaultRenderer(); |
|
668 | + $renderer = & $feedback_form->defaultRenderer(); |
|
669 | 669 | $renderer->setFormTemplate('<form{attributes}><div align="left">{content}</div></form>'); |
670 | 670 | $renderer->setCustomElementTemplate('<div align="left">{element}</div>'); |
671 | 671 | $comnt = Event::get_comments($id, $questionId); |
672 | - $default = array('comments_' . $questionId => $comnt); |
|
672 | + $default = array('comments_'.$questionId => $comnt); |
|
673 | 673 | |
674 | 674 | if ($useAdvancedEditor) { |
675 | 675 | $feedback_form->addElement( |
676 | 676 | 'html_editor', |
677 | - 'comments_' . $questionId, |
|
677 | + 'comments_'.$questionId, |
|
678 | 678 | null, |
679 | 679 | null, |
680 | 680 | array( |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | ) |
685 | 685 | ); |
686 | 686 | } else { |
687 | - $feedback_form->addElement('textarea', 'comments_' . $questionId); |
|
687 | + $feedback_form->addElement('textarea', 'comments_'.$questionId); |
|
688 | 688 | } |
689 | 689 | $feedback_form->addElement('html', '<br>'); |
690 | 690 | $feedback_form->setDefaults($default); |
@@ -695,21 +695,21 @@ discard block |
||
695 | 695 | $comnt = Event::get_comments($id, $questionId); |
696 | 696 | echo '<br />'; |
697 | 697 | if (!empty($comnt)) { |
698 | - echo '<b>' . get_lang('Feedback') . '</b>'; |
|
699 | - echo '<div id="question_feedback">' . $comnt . '</div>'; |
|
698 | + echo '<b>'.get_lang('Feedback').'</b>'; |
|
699 | + echo '<div id="question_feedback">'.$comnt.'</div>'; |
|
700 | 700 | } |
701 | 701 | } |
702 | 702 | |
703 | 703 | if ($is_allowedToEdit && $isFeedbackAllowed) { |
704 | 704 | if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) { |
705 | - $marksname = "marksName" . $questionId; |
|
706 | - echo '<div id="' . $marksname . '" style="display:none">'; |
|
707 | - echo '<form name="marksform_' . $questionId . '" method="post" action="">'; |
|
705 | + $marksname = "marksName".$questionId; |
|
706 | + echo '<div id="'.$marksname.'" style="display:none">'; |
|
707 | + echo '<form name="marksform_'.$questionId.'" method="post" action="">'; |
|
708 | 708 | $arrmarks[] = $questionId; |
709 | 709 | echo get_lang("AssignMarks"); |
710 | 710 | echo " <select name='marks' id='marks'>"; |
711 | 711 | for ($i = 0; $i <= $questionWeighting; $i++) { |
712 | - echo '<option ' . (($i == $questionScore) ? "selected='selected'" : '') . '>' . $i . '</option>'; |
|
712 | + echo '<option '.(($i == $questionScore) ? "selected='selected'" : '').'>'.$i.'</option>'; |
|
713 | 713 | } |
714 | 714 | echo '</select>'; |
715 | 715 | echo '</form><br /></div>'; |
@@ -720,8 +720,8 @@ discard block |
||
720 | 720 | } |
721 | 721 | } else { |
722 | 722 | $arrmarks[] = $questionId; |
723 | - echo '<div id="' . $marksname . '" style="display:none"><form name="marksform_' . $questionId . '" method="post" action=""> |
|
724 | - <select name="marks" id="marks" style="display:none;"><option>' . $questionScore . '</option></select></form><br/ ></div>'; |
|
723 | + echo '<div id="'.$marksname.'" style="display:none"><form name="marksform_'.$questionId.'" method="post" action=""> |
|
724 | + <select name="marks" id="marks" style="display:none;"><option>' . $questionScore.'</option></select></form><br/ ></div>'; |
|
725 | 725 | } |
726 | 726 | } else { |
727 | 727 | if ($questionScore == -1) { |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | |
778 | 778 | $score = array(); |
779 | 779 | if ($show_results) { |
780 | - $score['result'] = get_lang('Score') . " : " . ExerciseLib::show_score( |
|
780 | + $score['result'] = get_lang('Score')." : ".ExerciseLib::show_score( |
|
781 | 781 | $my_total_score, |
782 | 782 | $my_total_weight, |
783 | 783 | false, |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | |
850 | 850 | if ($isFeedbackAllowed) { |
851 | 851 | if (in_array($origin, array('tracking_course', 'user_course', 'correct_exercise_in_lp'))) { |
852 | - $formUrl = api_get_path(WEB_CODE_PATH) . 'exercise/exercise_report.php?' . api_get_cidreq() . '&'; |
|
852 | + $formUrl = api_get_path(WEB_CODE_PATH).'exercise/exercise_report.php?'.api_get_cidreq().'&'; |
|
853 | 853 | $formUrl .= http_build_query([ |
854 | 854 | 'exerciseId' => $exercise_id, |
855 | 855 | 'filter' => 2, |
@@ -861,14 +861,14 @@ discard block |
||
861 | 861 | ]); |
862 | 862 | $formUrl .= $fromlink; |
863 | 863 | |
864 | - echo '<form name="myform" id="myform" action="' . $formUrl . '" method="post">'; |
|
865 | - echo '<input type = "hidden" name="lp_item_id" value="' . $learnpath_id . '">'; |
|
866 | - echo '<input type = "hidden" name="lp_item_view_id" value="' . $lp_item_view_id . '">'; |
|
867 | - echo '<input type = "hidden" name="student_id" value="' . $student_id . '">'; |
|
868 | - echo '<input type = "hidden" name="total_score" value="' . $totalScore . '"> '; |
|
869 | - echo '<input type = "hidden" name="my_exe_exo_id" value="' . $exercise_id . '"> '; |
|
864 | + echo '<form name="myform" id="myform" action="'.$formUrl.'" method="post">'; |
|
865 | + echo '<input type = "hidden" name="lp_item_id" value="'.$learnpath_id.'">'; |
|
866 | + echo '<input type = "hidden" name="lp_item_view_id" value="'.$lp_item_view_id.'">'; |
|
867 | + echo '<input type = "hidden" name="student_id" value="'.$student_id.'">'; |
|
868 | + echo '<input type = "hidden" name="total_score" value="'.$totalScore.'"> '; |
|
869 | + echo '<input type = "hidden" name="my_exe_exo_id" value="'.$exercise_id.'"> '; |
|
870 | 870 | } else { |
871 | - $formUrl = api_get_path(WEB_CODE_PATH) . 'exercise/exercise_report.php?' . api_get_cidreq() . '&'; |
|
871 | + $formUrl = api_get_path(WEB_CODE_PATH).'exercise/exercise_report.php?'.api_get_cidreq().'&'; |
|
872 | 872 | $formUrl .= http_build_query([ |
873 | 873 | 'exerciseId' => $exercise_id, |
874 | 874 | 'filter' => 1, |
@@ -876,11 +876,11 @@ discard block |
||
876 | 876 | 'exeid' => $id |
877 | 877 | ]); |
878 | 878 | |
879 | - echo ' <form name="myform" id="myform" action="' . $formUrl . '" method="post">'; |
|
879 | + echo ' <form name="myform" id="myform" action="'.$formUrl.'" method="post">'; |
|
880 | 880 | } |
881 | 881 | |
882 | 882 | if ($origin != 'learnpath' && $origin != 'student_progress') { |
883 | - echo '<label><input type= "checkbox" name="send_notification"> ' . get_lang('SendEmail') . '</label>'; |
|
883 | + echo '<label><input type= "checkbox" name="send_notification"> '.get_lang('SendEmail').'</label>'; |
|
884 | 884 | ?> |
885 | 885 | <br/> |
886 | 886 | <button type="submit" class="btn btn-primary" value="<?php echo get_lang('Ok'); ?>" |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | } else { |
914 | 914 | if (!isset($_GET['fb_type'])) { |
915 | 915 | $lp_mode = $_SESSION['lp_mode']; |
916 | - $url = '../lp/lp_controller.php?' . api_get_cidreq() . '&'; |
|
916 | + $url = '../lp/lp_controller.php?'.api_get_cidreq().'&'; |
|
917 | 917 | $url .= http_build_url([ |
918 | 918 | 'action' => 'view', |
919 | 919 | 'lp_id' => $learnpath_id, |
@@ -921,13 +921,13 @@ discard block |
||
921 | 921 | 'exeId' => $exeId, |
922 | 922 | 'fb_type' => $feedback_type |
923 | 923 | ]); |
924 | - $href = ($lp_mode == 'fullscreen') ? ' window.opener.location.href="' . $url . '" ' : ' top.location.href="' . $url . '" '; |
|
925 | - echo '<script type="text/javascript">' . $href . '</script>'; |
|
924 | + $href = ($lp_mode == 'fullscreen') ? ' window.opener.location.href="'.$url.'" ' : ' top.location.href="'.$url.'" '; |
|
925 | + echo '<script type="text/javascript">'.$href.'</script>'; |
|
926 | 926 | // Record the results in the learning path, using the SCORM interface (API) |
927 | 927 | echo "<script>window.parent.API.void_save_asset('$totalScore', '$totalWeighting', 0, 'completed'); </script>"; |
928 | 928 | echo '</body></html>'; |
929 | 929 | } else { |
930 | - Display::display_normal_message(get_lang('ExerciseFinished') . ' ' . get_lang('ToContinueUseMenu')); |
|
930 | + Display::display_normal_message(get_lang('ExerciseFinished').' '.get_lang('ToContinueUseMenu')); |
|
931 | 931 | echo '<br />'; |
932 | 932 | } |
933 | 933 | } |
@@ -10,41 +10,41 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | require_once __DIR__.'/../inc/global.inc.php'; |
13 | -$this_section=SECTION_COURSES; |
|
13 | +$this_section = SECTION_COURSES; |
|
14 | 14 | api_protect_course_script(true); |
15 | 15 | |
16 | 16 | // moved down to fix bug: http://www.dokeos.com/forum/viewtopic.php?p=18609#18609 |
17 | 17 | $show = (isset($_GET['show']) && $_GET['show'] == 'result') ? 'result' : 'test'; |
18 | 18 | |
19 | 19 | /* Constants and variables */ |
20 | -$is_allowedToEdit = api_is_allowed_to_edit(null,true); |
|
20 | +$is_allowedToEdit = api_is_allowed_to_edit(null, true); |
|
21 | 21 | $is_tutor = api_is_allowed_to_edit(true); |
22 | 22 | |
23 | -if (!$is_allowedToEdit){ |
|
24 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'exercise/exercise.php?' . api_get_cidreq()); |
|
23 | +if (!$is_allowedToEdit) { |
|
24 | + header('Location: '.api_get_path(WEB_CODE_PATH).'exercise/exercise.php?'.api_get_cidreq()); |
|
25 | 25 | exit; |
26 | 26 | } |
27 | 27 | |
28 | -$interbreadcrumb[]= array ('url' => 'exercise_report.php?'.api_get_cidreq(),'name' => get_lang('Exercises')); |
|
29 | -$interbreadcrumb[]= array ('url' => 'exercise_report.php?filter=2&'.api_get_cidreq(),'name' => get_lang('StudentScore')); |
|
30 | -$interbreadcrumb[]= array ('url' => 'exercise_history.php?exe_id='.intval($_GET['exe_id']).'&'.api_get_cidreq(), 'name' => get_lang('Details')); |
|
28 | +$interbreadcrumb[] = array('url' => 'exercise_report.php?'.api_get_cidreq(), 'name' => get_lang('Exercises')); |
|
29 | +$interbreadcrumb[] = array('url' => 'exercise_report.php?filter=2&'.api_get_cidreq(), 'name' => get_lang('StudentScore')); |
|
30 | +$interbreadcrumb[] = array('url' => 'exercise_history.php?exe_id='.intval($_GET['exe_id']).'&'.api_get_cidreq(), 'name' => get_lang('Details')); |
|
31 | 31 | |
32 | 32 | $TBL_USER = Database::get_main_table(TABLE_MAIN_USER); |
33 | 33 | $TBL_EXERCISES = Database::get_course_table(TABLE_QUIZ_TEST); |
34 | 34 | $TBL_EXERCISES_QUESTION = Database::get_course_table(TABLE_QUIZ_QUESTION); |
35 | -$TBL_TRACK_ATTEMPT_RECORDING= Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT_RECORDING); |
|
36 | -Display::display_header($nameTools,get_lang('Exercise')); |
|
35 | +$TBL_TRACK_ATTEMPT_RECORDING = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT_RECORDING); |
|
36 | +Display::display_header($nameTools, get_lang('Exercise')); |
|
37 | 37 | |
38 | 38 | if (isset($_GET['message'])) { |
39 | 39 | if (in_array($_GET['message'], array('ExerciseEdited'))) { |
40 | - $my_message_history=Security::remove_XSS($_GET['message']); |
|
40 | + $my_message_history = Security::remove_XSS($_GET['message']); |
|
41 | 41 | Display::display_confirmation_message(get_lang($my_message_history)); |
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | 45 | echo '<div class="actions">'; |
46 | -echo '<a href="exercise_report.php?' . api_get_cidreq() . '&filter=2">' . |
|
47 | - Display :: return_icon('back.png', get_lang('BackToResultList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
46 | +echo '<a href="exercise_report.php?'.api_get_cidreq().'&filter=2">'. |
|
47 | + Display :: return_icon('back.png', get_lang('BackToResultList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
48 | 48 | echo '</div>'; |
49 | 49 | |
50 | 50 | ?> |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | WHERE |
66 | 66 | quiz_question.id = question_id AND |
67 | 67 | user_id = author AND |
68 | - exe_id = '".(int)$_GET['exe_id']."' |
|
68 | + exe_id = '".(int) $_GET['exe_id']."' |
|
69 | 69 | ORDER BY position"; |
70 | 70 | $query = Database::query($sql); |
71 | -while($row = Database::fetch_array($query)){ |
|
71 | +while ($row = Database::fetch_array($query)) { |
|
72 | 72 | echo '<tr'; |
73 | 73 | if ($i % 2 == 0) { |
74 | 74 | echo 'class="row_odd"'; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | if ($geolocalization) { |
75 | 75 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
76 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
76 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | $htmlHeadXtra[] = api_get_css_asset('cropper/dist/cropper.min.css'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | if (api_get_setting('login_is_email') == 'true') { |
156 | - $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
156 | + $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
157 | 157 | $form->addRule('email', get_lang('UserTaken'), 'username_available', $user_data['username']); |
158 | 158 | } |
159 | 159 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | if (api_get_setting('login_is_email') != 'true') { |
188 | 188 | $form->addElement('text', 'username', get_lang('LoginName'), array('maxlength' => USERNAME_MAX_LENGTH)); |
189 | 189 | $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required'); |
190 | - $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
190 | + $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
191 | 191 | $form->addRule('username', get_lang('OnlyLettersAndNumbersAllowed'), 'username'); |
192 | 192 | $form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']); |
193 | 193 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | } |
225 | 225 | $form->addElement('radio', 'reset_password', null, get_lang('AutoGeneratePassword'), 1); |
226 | 226 | $group = array(); |
227 | -$group[] =$form->createElement('radio', 'reset_password', null, get_lang('EnterPassword'), 2); |
|
227 | +$group[] = $form->createElement('radio', 'reset_password', null, get_lang('EnterPassword'), 2); |
|
228 | 228 | $group[] = $form->createElement( |
229 | 229 | 'password', |
230 | 230 | 'password', |
@@ -258,10 +258,10 @@ discard block |
||
258 | 258 | // Platform admin |
259 | 259 | if (api_is_platform_admin()) { |
260 | 260 | $group = array(); |
261 | - $group[] =$form->createElement('radio', 'platform_admin', null, get_lang('Yes'), 1); |
|
262 | - $group[] =$form->createElement('radio', 'platform_admin', null, get_lang('No'), 0); |
|
261 | + $group[] = $form->createElement('radio', 'platform_admin', null, get_lang('Yes'), 1); |
|
262 | + $group[] = $form->createElement('radio', 'platform_admin', null, get_lang('No'), 0); |
|
263 | 263 | |
264 | - $user_data['status'] == 1 ? $display = 'block':$display = 'none'; |
|
264 | + $user_data['status'] == 1 ? $display = 'block' : $display = 'none'; |
|
265 | 265 | |
266 | 266 | $form->addElement('html', '<div id="id_platform_admin" style="display:'.$display.'">'); |
267 | 267 | $form->addGroup($group, 'admin', get_lang('PlatformAdmin'), null, false); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | if (!$user_data['platform_admin']) { |
286 | 286 | // Expiration Date |
287 | 287 | $form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0); |
288 | - $group = array (); |
|
288 | + $group = array(); |
|
289 | 289 | $group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('Enabled'), 1); |
290 | 290 | $group[] = $form->createElement('DateTimePicker', 'expiration_date', null, array('onchange' => 'javascript: enable_expiration_date();')); |
291 | 291 | $form->addGroup($group, 'max_member_group', null, null, false); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | if ($studentBoss) { |
304 | 304 | foreach ($studentBoss as $bossId => $userData) { |
305 | 305 | $bossInfo = api_get_user_info($userData['user_id']); |
306 | - $studentBossToSelect[$bossInfo['user_id']] = $bossInfo['complete_name_with_username']; |
|
306 | + $studentBossToSelect[$bossInfo['user_id']] = $bossInfo['complete_name_with_username']; |
|
307 | 307 | } |
308 | 308 | } |
309 | 309 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $jquery_ready_content = $returnParams['jquery_ready_content']; |
321 | 321 | |
322 | 322 | // the $jquery_ready_content variable collects all functions that will be load in the $(document).ready javascript function |
323 | -$htmlHeadXtra[] ='<script> |
|
323 | +$htmlHeadXtra[] = '<script> |
|
324 | 324 | $(document).ready(function(){ |
325 | 325 | '.$jquery_ready_content.' |
326 | 326 | }); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | if ($geolocalization) { |
35 | 35 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
36 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
36 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | $htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1'); |
@@ -119,10 +119,10 @@ discard block |
||
119 | 119 | if (api_is_western_name_order()) { |
120 | 120 | // FIRST NAME and LAST NAME |
121 | 121 | $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40)); |
122 | - $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
122 | + $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
123 | 123 | } else { |
124 | 124 | // LAST NAME and FIRST NAME |
125 | - $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
125 | + $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
126 | 126 | $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40)); |
127 | 127 | } |
128 | 128 | if (api_get_setting('profile', 'name') !== 'true') { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $form->applyFilter(array('lastname', 'firstname'), 'stripslashes'); |
132 | 132 | $form->applyFilter(array('lastname', 'firstname'), 'trim'); |
133 | 133 | $form->applyFilter(array('lastname', 'firstname'), 'html_filter'); |
134 | -$form->addRule('lastname' , get_lang('ThisFieldIsRequired'), 'required'); |
|
134 | +$form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required'); |
|
135 | 135 | $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required'); |
136 | 136 | |
137 | 137 | // USERNAME |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $form->freeze('email'); |
177 | 177 | } |
178 | 178 | |
179 | -if (api_get_setting('registration', 'email') == 'true' && api_get_setting('profile', 'email') == 'true') { |
|
179 | +if (api_get_setting('registration', 'email') == 'true' && api_get_setting('profile', 'email') == 'true') { |
|
180 | 180 | $form->applyFilter('email', 'stripslashes'); |
181 | 181 | $form->applyFilter('email', 'trim'); |
182 | 182 | $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required'); |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | // the $jquery_ready_content variable collects all functions that |
330 | 330 | // will be load in the $(document).ready javascript function |
331 | -$htmlHeadXtra[] ='<script> |
|
331 | +$htmlHeadXtra[] = '<script> |
|
332 | 332 | $(document).ready(function(){ |
333 | 333 | '.$jquery_ready_content.' |
334 | 334 | }); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | if ($geolocalization) { |
37 | 37 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
38 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
38 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $htmlHeadXtra[] = api_get_password_checker_js('#username', '#pass1'); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | if (api_get_setting('registration', 'email') != 'true') { |
97 | 97 | $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required'); |
98 | 98 | } |
99 | - $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
99 | + $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
100 | 100 | $form->addRule('email', get_lang('UserTaken'), 'username_available'); |
101 | 101 | } |
102 | 102 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ); |
138 | 138 | $form->applyFilter('username', 'trim'); |
139 | 139 | $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required'); |
140 | - $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
140 | + $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
141 | 141 | $form->addRule('username', get_lang('UsernameWrong'), 'username'); |
142 | 142 | $form->addRule('username', get_lang('UserTaken'), 'username_available'); |
143 | 143 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if (CHECK_PASS_EASY_TO_FIND) { |
169 | 169 | $form->addRule( |
170 | 170 | 'pass1', |
171 | - get_lang('PassTooEasy') . ': ' . api_generate_password(), |
|
171 | + get_lang('PassTooEasy').': '.api_generate_password(), |
|
172 | 172 | 'callback', |
173 | 173 | 'api_check_password' |
174 | 174 | ); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | ) |
241 | 241 | ); |
242 | 242 | |
243 | - $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options); |
|
243 | + $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options); |
|
244 | 244 | $form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne')); |
245 | 245 | |
246 | 246 | $form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), array('size' => 40)); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | } |
384 | 384 | } |
385 | 385 | |
386 | - $tool_name = get_lang('Registration', null, (!empty($_POST['language'])?$_POST['language']: $_user['language'])); |
|
386 | + $tool_name = get_lang('Registration', null, (!empty($_POST['language']) ? $_POST['language'] : $_user['language'])); |
|
387 | 387 | |
388 | 388 | if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_registered_show_terms) { |
389 | 389 | $tool_name = get_lang('TermsAndConditions'); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | |
406 | 406 | if (file_exists($home.'register_top_'.$user_selected_language.'.html')) { |
407 | - $home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
407 | + $home_top_temp = @(string) file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
408 | 408 | $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
409 | 409 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
410 | 410 | if (!empty($open)) { |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | if (api_get_setting('show_terms_if_profile_completed') === 'true') { |
435 | 435 | $userInfo = api_get_user_info(); |
436 | 436 | if ($userInfo && $userInfo['status'] != ANONYMOUS) { |
437 | - if ((int)$userInfo['profile_completed'] !== 1) { |
|
437 | + if ((int) $userInfo['profile_completed'] !== 1) { |
|
438 | 438 | api_not_allowed(true); |
439 | 439 | } |
440 | 440 | } |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | Database::query($sql); |
648 | 648 | |
649 | 649 | // 2. Send mail to all platform admin |
650 | - $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username']; |
|
650 | + $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username']; |
|
651 | 651 | $emailbody = get_lang('ApprovalForNewAccount', null, $values['language'])."\n"; |
652 | 652 | $emailbody .= get_lang('UserName', null, $values['language']).': '.$values['username']."\n"; |
653 | 653 | |
@@ -787,14 +787,14 @@ discard block |
||
787 | 787 | } |
788 | 788 | } else { |
789 | 789 | if (!empty($values['email'])) { |
790 | - $text_after_registration.= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>'; |
|
790 | + $text_after_registration .= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>'; |
|
791 | 791 | } |
792 | 792 | |
793 | 793 | if ($is_allowedCreateCourse) { |
794 | 794 | if ($usersCanCreateCourse) { |
795 | - $form_data['message'] = '<p>'. get_lang('NowGoCreateYourCourse', null, $_user['language']). "</p>"; |
|
795 | + $form_data['message'] = '<p>'.get_lang('NowGoCreateYourCourse', null, $_user['language'])."</p>"; |
|
796 | 796 | } |
797 | - $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php'; |
|
797 | + $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php'; |
|
798 | 798 | |
799 | 799 | if (api_get_setting('course_validation') === 'true') { |
800 | 800 | $form_data['button'] = Display::button( |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | } else { |
818 | 818 | if (api_get_setting('allow_students_to_browse_courses') == 'true') { |
819 | 819 | $form_data['action'] = 'courses.php?action=subscribe'; |
820 | - $form_data['message'] = '<p>'. get_lang('NowGoChooseYourCourses', null, $_user['language']). ".</p>"; |
|
820 | + $form_data['message'] = '<p>'.get_lang('NowGoChooseYourCourses', null, $_user['language']).".</p>"; |
|
821 | 821 | } else { |
822 | 822 | $form_data['action'] = api_get_path(WEB_PATH).'user_portal.php'; |
823 | 823 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | if ($apiIsEnable) { |
23 | 23 | $gmapsApiKey = $plugin->get('api_key'); |
24 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key='. $gmapsApiKey . '" ></script>'; |
|
24 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key='.$gmapsApiKey.'" ></script>'; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | $em = Database::getManager(); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $sql = "SELECT COUNT(id) as count |
57 | 57 | FROM $table |
58 | 58 | WHERE |
59 | - user_receiver_id=" . api_get_user_id() . " AND |
|
59 | + user_receiver_id=".api_get_user_id()." AND |
|
60 | 60 | msg_status = " . MESSAGE_STATUS_UNREAD; |
61 | 61 | $result = Database::query($sql); |
62 | 62 | $row = Database::fetch_assoc($result); |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | { |
86 | 86 | $table_message = Database::get_main_table(TABLE_MESSAGE); |
87 | 87 | if ($unread) { |
88 | - $condition_msg_status = ' msg_status = ' . MESSAGE_STATUS_UNREAD . ' '; |
|
88 | + $condition_msg_status = ' msg_status = '.MESSAGE_STATUS_UNREAD.' '; |
|
89 | 89 | } else { |
90 | - $condition_msg_status = ' msg_status IN(' . MESSAGE_STATUS_NEW . ',' . MESSAGE_STATUS_UNREAD . ') '; |
|
90 | + $condition_msg_status = ' msg_status IN('.MESSAGE_STATUS_NEW.','.MESSAGE_STATUS_UNREAD.') '; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | $keyword = Session::read('message_search_keyword'); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $sql = "SELECT COUNT(id) as number_messages |
101 | 101 | FROM $table_message |
102 | 102 | WHERE $condition_msg_status AND |
103 | - user_receiver_id=" . api_get_user_id() . " |
|
103 | + user_receiver_id=".api_get_user_id()." |
|
104 | 104 | $keywordCondition |
105 | 105 | "; |
106 | 106 | $result = Database::query($sql); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | msg_status as col4 |
149 | 149 | FROM $table_message |
150 | 150 | WHERE |
151 | - user_receiver_id=" . api_get_user_id() . " AND |
|
151 | + user_receiver_id=".api_get_user_id()." AND |
|
152 | 152 | msg_status IN (0,1) |
153 | 153 | $keywordCondition |
154 | 154 | ORDER BY col$column $direction |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | $link = '&f=social'; |
174 | 174 | } |
175 | 175 | $userInfo = api_get_user_info($result[1]); |
176 | - $message[1] = '<a ' . $class . ' href="view_message.php?id=' . $result[0] . $link . '">' . $result[2] . '</a><br />' . $userInfo['complete_name']; |
|
177 | - $message[3] = '<a href="new_message.php?re_id=' . $result[0] . $link . '">' . |
|
178 | - Display::return_icon('message_reply.png', get_lang('ReplyToMessage')) . '</a>' . |
|
179 | - ' <a onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage'))) . "'" . ')) return false;" href="inbox.php?action=deleteone&id=' . $result[0] . $link . '">' . Display::return_icon('delete.png', get_lang('DeleteMessage')) . '</a>'; |
|
176 | + $message[1] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.$result[2].'</a><br />'.$userInfo['complete_name']; |
|
177 | + $message[3] = '<a href="new_message.php?re_id='.$result[0].$link.'">'. |
|
178 | + Display::return_icon('message_reply.png', get_lang('ReplyToMessage')).'</a>'. |
|
179 | + ' <a onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;" href="inbox.php?action=deleteone&id='.$result[0].$link.'">'.Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a>'; |
|
180 | 180 | |
181 | 181 | $message[2] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same |
182 | 182 | foreach ($message as $key => $value) { |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | //@todo it's possible to edit a message? yes, only for groups |
282 | 282 | if ($edit_message_id) { |
283 | 283 | $query = " UPDATE $table_message SET |
284 | - update_date = '" . $now . "', |
|
284 | + update_date = '".$now."', |
|
285 | 285 | content = '".Database::escape_string($content)."' |
286 | 286 | WHERE id = '$edit_message_id' "; |
287 | 287 | Database::query($query); |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $message = sprintf( |
451 | 451 | get_lang('CopyOfMessageSentToXUser'), |
452 | 452 | $userInfo['complete_name'] |
453 | - ) . ' <br />' . $message; |
|
453 | + ).' <br />'.$message; |
|
454 | 454 | |
455 | 455 | MessageManager::send_message_simple( |
456 | 456 | $drhInfo['user_id'], |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | $row = Database::fetch_array($rs_msg_id); |
499 | 499 | |
500 | 500 | // update parent_id for other user receiver |
501 | - $sql = "UPDATE $table_message SET parent_id = " . $row['id'] . " |
|
501 | + $sql = "UPDATE $table_message SET parent_id = ".$row['id']." |
|
502 | 502 | WHERE id = $message_id"; |
503 | 503 | Database::query($sql); |
504 | 504 | } |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | $user_receiver_id = intval($user_receiver_id); |
518 | 518 | $id = intval($id); |
519 | 519 | $sql = "SELECT * FROM $table_message |
520 | - WHERE id=" . $id . " AND msg_status<>4"; |
|
520 | + WHERE id=".$id." AND msg_status<>4"; |
|
521 | 521 | $rs = Database::query($sql); |
522 | 522 | |
523 | 523 | if (Database::num_rows($rs) > 0) { |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | self::delete_message_attachment_file($id, $user_receiver_id); |
526 | 526 | // delete message |
527 | 527 | $query = "UPDATE $table_message SET msg_status=3 |
528 | - WHERE user_receiver_id=" . $user_receiver_id . " AND id=" . $id; |
|
528 | + WHERE user_receiver_id=".$user_receiver_id." AND id=".$id; |
|
529 | 529 | Database::query($query); |
530 | 530 | |
531 | 531 | return true; |
@@ -614,13 +614,13 @@ discard block |
||
614 | 614 | $path_user_info['dir'] = UserManager::getUserPathById($message_user_id, 'system'); |
615 | 615 | } |
616 | 616 | |
617 | - $path_message_attach = $path_user_info['dir'] . 'message_attachments/'; |
|
617 | + $path_message_attach = $path_user_info['dir'].'message_attachments/'; |
|
618 | 618 | |
619 | 619 | // If this directory does not exist - we create it. |
620 | 620 | if (!file_exists($path_message_attach)) { |
621 | 621 | @mkdir($path_message_attach, api_get_permissions_for_new_directories(), true); |
622 | 622 | } |
623 | - $new_path = $path_message_attach . $new_file_name; |
|
623 | + $new_path = $path_message_attach.$new_file_name; |
|
624 | 624 | if (is_uploaded_file($file_attach['tmp_name'])) { |
625 | 625 | @copy($file_attach['tmp_name'], $new_path); |
626 | 626 | } |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | while ($row = Database::fetch_array($rs)) { |
656 | 656 | $path = $row['path']; |
657 | 657 | $attach_id = $row['id']; |
658 | - $new_path = $path . '_DELETED_' . $attach_id; |
|
658 | + $new_path = $path.'_DELETED_'.$attach_id; |
|
659 | 659 | |
660 | 660 | if (!empty($group_id)) { |
661 | 661 | $userGroup = new UserGroup(); |
@@ -671,9 +671,9 @@ discard block |
||
671 | 671 | ); |
672 | 672 | } |
673 | 673 | |
674 | - $path_message_attach = $path_user_info['dir'] . 'message_attachments/'; |
|
675 | - if (is_file($path_message_attach . $path)) { |
|
676 | - if (rename($path_message_attach . $path, $path_message_attach . $new_path)) { |
|
674 | + $path_message_attach = $path_user_info['dir'].'message_attachments/'; |
|
675 | + if (is_file($path_message_attach.$path)) { |
|
676 | + if (rename($path_message_attach.$path, $path_message_attach.$new_path)) { |
|
677 | 677 | $sql = "UPDATE $table_message_attach set path='$new_path' |
678 | 678 | WHERE id ='$attach_id'"; |
679 | 679 | Database::query($sql); |
@@ -697,8 +697,8 @@ discard block |
||
697 | 697 | $sql = "UPDATE $table_message SET msg_status = '0' |
698 | 698 | WHERE |
699 | 699 | msg_status<>4 AND |
700 | - user_receiver_id=" . intval($user_id) . " AND |
|
701 | - id='" . intval($message_id) . "'"; |
|
700 | + user_receiver_id=".intval($user_id)." AND |
|
701 | + id='" . intval($message_id)."'"; |
|
702 | 702 | Database::query($sql); |
703 | 703 | } |
704 | 704 | |
@@ -718,8 +718,8 @@ discard block |
||
718 | 718 | $sql = "UPDATE $table_message SET |
719 | 719 | msg_status = '$type' |
720 | 720 | WHERE |
721 | - user_receiver_id=" . intval($user_id) . " AND |
|
722 | - id='" . intval($message_id) . "'"; |
|
721 | + user_receiver_id=".intval($user_id)." AND |
|
722 | + id='" . intval($message_id)."'"; |
|
723 | 723 | Database::query($sql); |
724 | 724 | } |
725 | 725 | |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | return false; |
736 | 736 | $table_message = Database::get_main_table(TABLE_MESSAGE); |
737 | 737 | $query = "SELECT * FROM $table_message |
738 | - WHERE user_receiver_id=" . intval($user_id) . " AND id='" . intval($message_id) . "'"; |
|
738 | + WHERE user_receiver_id=".intval($user_id)." AND id='".intval($message_id)."'"; |
|
739 | 739 | $result = Database::query($query); |
740 | 740 | |
741 | 741 | return $row = Database::fetch_array($result); |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | $sql = "SELECT * FROM $table_message |
758 | 758 | WHERE |
759 | 759 | group_id= $group_id AND |
760 | - msg_status NOT IN ('" . MESSAGE_STATUS_OUTBOX . "', '" . MESSAGE_STATUS_DELETED . "') |
|
760 | + msg_status NOT IN ('".MESSAGE_STATUS_OUTBOX."', '".MESSAGE_STATUS_DELETED."') |
|
761 | 761 | ORDER BY id"; |
762 | 762 | $rs = Database::query($sql); |
763 | 763 | $data = array(); |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | $sql = "SELECT * FROM $table_message |
786 | 786 | WHERE |
787 | 787 | group_id = $group_id AND |
788 | - msg_status NOT IN ('" . MESSAGE_STATUS_OUTBOX . "', '" . MESSAGE_STATUS_DELETED . "') |
|
788 | + msg_status NOT IN ('".MESSAGE_STATUS_OUTBOX."', '".MESSAGE_STATUS_DELETED."') |
|
789 | 789 | ORDER BY id "; |
790 | 790 | |
791 | 791 | $rs = Database::query($sql); |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | $sql = "SELECT * FROM $table_message |
835 | 835 | WHERE |
836 | 836 | parent_id='$parent_id' AND |
837 | - msg_status <> " . MESSAGE_STATUS_OUTBOX . " |
|
837 | + msg_status <> ".MESSAGE_STATUS_OUTBOX." |
|
838 | 838 | $condition_group_id |
839 | 839 | ORDER BY send_date DESC $condition_limit "; |
840 | 840 | $rs = Database::query($sql); |
@@ -862,8 +862,8 @@ discard block |
||
862 | 862 | $table_message = Database::get_main_table(TABLE_MESSAGE); |
863 | 863 | $query = "SELECT id FROM $table_message |
864 | 864 | WHERE |
865 | - user_receiver_id = " . intval($user_id) . " AND |
|
866 | - id = '" . intval($id) . "'"; |
|
865 | + user_receiver_id = ".intval($user_id)." AND |
|
866 | + id = '" . intval($id)."'"; |
|
867 | 867 | $result = Database::query($query); |
868 | 868 | $num = Database::num_rows($result); |
869 | 869 | if ($num > 0) { |
@@ -911,8 +911,8 @@ discard block |
||
911 | 911 | msg_status as col5 |
912 | 912 | FROM $table_message |
913 | 913 | WHERE |
914 | - user_sender_id=" . api_get_user_id() . " AND |
|
915 | - msg_status=" . MESSAGE_STATUS_OUTBOX . " |
|
914 | + user_sender_id=".api_get_user_id()." AND |
|
915 | + msg_status=" . MESSAGE_STATUS_OUTBOX." |
|
916 | 916 | $keywordCondition |
917 | 917 | ORDER BY col$column $direction |
918 | 918 | LIMIT $from, $number_of_items"; |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | $message_list = array(); |
922 | 922 | while ($result = Database::fetch_row($sql_result)) { |
923 | 923 | if ($request === true) { |
924 | - $message[0] = '<input type="checkbox" value=' . $result[0] . ' name="out[]">'; |
|
924 | + $message[0] = '<input type="checkbox" value='.$result[0].' name="out[]">'; |
|
925 | 925 | } else { |
926 | 926 | $message[0] = ($result[0]); |
927 | 927 | } |
@@ -929,20 +929,20 @@ discard block |
||
929 | 929 | $result[2] = Security::remove_XSS($result[2]); |
930 | 930 | $userInfo = api_get_user_info($result[4]); |
931 | 931 | if ($request === true) { |
932 | - $message[1] = '<a onclick="show_sent_message(' . $result[0] . ')" href="javascript:void(0)">' . $userInfo['complete_name'] . '</a>'; |
|
933 | - $message[2] = '<a onclick="show_sent_message(' . $result[0] . ')" href="javascript:void(0)">' . str_replace("\\", "", $result[2]) . '</a>'; |
|
932 | + $message[1] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.$userInfo['complete_name'].'</a>'; |
|
933 | + $message[2] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.str_replace("\\", "", $result[2]).'</a>'; |
|
934 | 934 | $message[3] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same |
935 | - $message[4] = ' <a onclick="delete_one_message_outbox(' . $result[0] . ')" href="javascript:void(0)" >' . |
|
936 | - Display::return_icon('delete.png', get_lang('DeleteMessage')) . '</a>'; |
|
935 | + $message[4] = ' <a onclick="delete_one_message_outbox('.$result[0].')" href="javascript:void(0)" >'. |
|
936 | + Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a>'; |
|
937 | 937 | } else { |
938 | 938 | $link = ''; |
939 | 939 | if (isset($_GET['f']) && $_GET['f'] == 'social') { |
940 | 940 | $link = '&f=social'; |
941 | 941 | } |
942 | - $message[1] = '<a ' . $class . ' onclick="show_sent_message (' . $result[0] . ')" href="../messages/view_message.php?id_send=' . $result[0] . $link . '">' . $result[2] . '</a><br />' . $userInfo['complete_name']; |
|
942 | + $message[1] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.$result[2].'</a><br />'.$userInfo['complete_name']; |
|
943 | 943 | $message[2] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same |
944 | - $message[3] = '<a href="outbox.php?action=deleteone&id=' . $result[0] . '&' . $link . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage'))) . "'" . ')) return false;" >' . |
|
945 | - Display::return_icon('delete.png', get_lang('DeleteMessage')) . '</a>'; |
|
944 | + $message[3] = '<a href="outbox.php?action=deleteone&id='.$result[0].'&'.$link.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;" >'. |
|
945 | + Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a>'; |
|
946 | 946 | } |
947 | 947 | |
948 | 948 | foreach ($message as $key => $value) { |
@@ -975,8 +975,8 @@ discard block |
||
975 | 975 | $sql = "SELECT COUNT(id) as number_messages |
976 | 976 | FROM $table_message |
977 | 977 | WHERE |
978 | - msg_status=" . MESSAGE_STATUS_OUTBOX . " AND |
|
979 | - user_sender_id=" . api_get_user_id() . " |
|
978 | + msg_status=".MESSAGE_STATUS_OUTBOX." AND |
|
979 | + user_sender_id=" . api_get_user_id()." |
|
980 | 980 | $keywordCondition |
981 | 981 | "; |
982 | 982 | $result = Database::query($sql); |
@@ -1001,25 +1001,25 @@ discard block |
||
1001 | 1001 | if (isset($message_id) && is_numeric($message_id)) { |
1002 | 1002 | $query = "SELECT * FROM $table_message |
1003 | 1003 | WHERE |
1004 | - user_sender_id = " . api_get_user_id() . " AND |
|
1005 | - id = " . $message_id . " AND |
|
1004 | + user_sender_id = ".api_get_user_id()." AND |
|
1005 | + id = " . $message_id." AND |
|
1006 | 1006 | msg_status = 4;"; |
1007 | 1007 | $result = Database::query($query); |
1008 | 1008 | } |
1009 | 1009 | } else { |
1010 | 1010 | if (is_numeric($message_id) && !empty($message_id)) { |
1011 | 1011 | $query = "UPDATE $table_message SET |
1012 | - msg_status = '" . MESSAGE_STATUS_NEW . "' |
|
1012 | + msg_status = '".MESSAGE_STATUS_NEW."' |
|
1013 | 1013 | WHERE |
1014 | - user_receiver_id=" . api_get_user_id() . " AND |
|
1015 | - id='" . $message_id . "'"; |
|
1014 | + user_receiver_id=" . api_get_user_id()." AND |
|
1015 | + id='" . $message_id."'"; |
|
1016 | 1016 | Database::query($query); |
1017 | 1017 | |
1018 | 1018 | $query = "SELECT * FROM $table_message |
1019 | 1019 | WHERE |
1020 | 1020 | msg_status<>4 AND |
1021 | - user_receiver_id=" . api_get_user_id() . " AND |
|
1022 | - id='" . $message_id . "'"; |
|
1021 | + user_receiver_id=".api_get_user_id()." AND |
|
1022 | + id='" . $message_id."'"; |
|
1023 | 1023 | $result = Database::query($query); |
1024 | 1024 | } |
1025 | 1025 | } |
@@ -1056,8 +1056,8 @@ discard block |
||
1056 | 1056 | $message_content .= '</div>'; |
1057 | 1057 | |
1058 | 1058 | $message_content .= '<div class="col-md-4">'; |
1059 | - $message_content .= '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $user_sender_id . '">' . $name . '</a> '; |
|
1060 | - $message_content .= api_strtolower(get_lang('To')) . ' <b>' . $receiverUserInfo['complete_name']; |
|
1059 | + $message_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user_sender_id.'">'.$name.'</a> '; |
|
1060 | + $message_content .= api_strtolower(get_lang('To')).' <b>'.$receiverUserInfo['complete_name']; |
|
1061 | 1061 | $message_content .= '</div>'; |
1062 | 1062 | |
1063 | 1063 | $message_content .= '<div class="col-md-2 col-md-offset-5">'; |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | $message_content .= '</div>'; |
1071 | 1071 | |
1072 | 1072 | $message_content .= '<div class="col-md-4">'; |
1073 | - $message_content .= '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $user_sender_id . '">' . $name . '</a> '; |
|
1073 | + $message_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user_sender_id.'">'.$name.'</a> '; |
|
1074 | 1074 | $message_content .= '</div>'; |
1075 | 1075 | |
1076 | 1076 | $message_content .= '<div class="col-md-2 col-md-offset-5">'; |
@@ -1080,9 +1080,9 @@ discard block |
||
1080 | 1080 | $message_content .= '</div>'; |
1081 | 1081 | } else { |
1082 | 1082 | if ($source == 'outbox') { |
1083 | - $message_content .= get_lang('From') . ': ' . $name . '</b> ' . api_strtolower(get_lang('To')) . ' <b>' . $receiverUserInfo['complete_name'] . '</b>'; |
|
1083 | + $message_content .= get_lang('From').': '.$name.'</b> '.api_strtolower(get_lang('To')).' <b>'.$receiverUserInfo['complete_name'].'</b>'; |
|
1084 | 1084 | } else { |
1085 | - $message_content .= get_lang('From') . ': ' . $name . '</b> ' . api_strtolower(get_lang('To')) . ' <b>' . get_lang('Me') . '</b>'; |
|
1085 | + $message_content .= get_lang('From').': '.$name.'</b> '.api_strtolower(get_lang('To')).' <b>'.get_lang('Me').'</b>'; |
|
1086 | 1086 | } |
1087 | 1087 | } |
1088 | 1088 | $message_content .= ' |
@@ -1090,26 +1090,26 @@ discard block |
||
1090 | 1090 | <hr style="color:#ddd" /> |
1091 | 1091 | <table width="100%"> |
1092 | 1092 | <tr> |
1093 | - <td valign=top class="view-message-content">' . str_replace("\\", "", $content) . '</td> |
|
1093 | + <td valign=top class="view-message-content">' . str_replace("\\", "", $content).'</td> |
|
1094 | 1094 | </tr> |
1095 | 1095 | </table> |
1096 | - <div id="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div> |
|
1096 | + <div id="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '').'</div> |
|
1097 | 1097 | <div style="padding: 15px 0px 5px 0px">'; |
1098 | 1098 | $social_link = ''; |
1099 | 1099 | if (isset($_GET['f']) && $_GET['f'] == 'social') { |
1100 | 1100 | $social_link = 'f=social'; |
1101 | 1101 | } |
1102 | 1102 | if ($source == 'outbox') { |
1103 | - $message_content .= '<a href="outbox.php?' . $social_link . '">' . |
|
1104 | - Display::return_icon('back.png', get_lang('ReturnToOutbox')) . '</a>  '; |
|
1103 | + $message_content .= '<a href="outbox.php?'.$social_link.'">'. |
|
1104 | + Display::return_icon('back.png', get_lang('ReturnToOutbox')).'</a>  '; |
|
1105 | 1105 | } else { |
1106 | - $message_content .= '<a href="inbox.php?' . $social_link . '">' . |
|
1107 | - Display::return_icon('back.png', get_lang('ReturnToInbox')) . '</a>  '; |
|
1108 | - $message_content .= '<a href="new_message.php?re_id=' . $message_id . '&' . $social_link . '">' . |
|
1109 | - Display::return_icon('message_reply.png', get_lang('ReplyToMessage')) . '</a>  '; |
|
1106 | + $message_content .= '<a href="inbox.php?'.$social_link.'">'. |
|
1107 | + Display::return_icon('back.png', get_lang('ReturnToInbox')).'</a>  '; |
|
1108 | + $message_content .= '<a href="new_message.php?re_id='.$message_id.'&'.$social_link.'">'. |
|
1109 | + Display::return_icon('message_reply.png', get_lang('ReplyToMessage')).'</a>  '; |
|
1110 | 1110 | } |
1111 | - $message_content .= '<a href="inbox.php?action=deleteone&id=' . $message_id . '&' . $social_link . '" >' . |
|
1112 | - Display::return_icon('delete.png', get_lang('DeleteMessage')) . '</a> '; |
|
1111 | + $message_content .= '<a href="inbox.php?action=deleteone&id='.$message_id.'&'.$social_link.'" >'. |
|
1112 | + Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a> '; |
|
1113 | 1113 | |
1114 | 1114 | $message_content .= '</div></td> |
1115 | 1115 | <td width=10></td> |
@@ -1127,8 +1127,8 @@ discard block |
||
1127 | 1127 | public static function get_user_id_by_email($user_email) |
1128 | 1128 | { |
1129 | 1129 | $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
1130 | - $sql = 'SELECT user_id FROM ' . $tbl_user . ' |
|
1131 | - WHERE email="' . Database::escape_string($user_email) . '";'; |
|
1130 | + $sql = 'SELECT user_id FROM '.$tbl_user.' |
|
1131 | + WHERE email="' . Database::escape_string($user_email).'";'; |
|
1132 | 1132 | $rs = Database::query($sql); |
1133 | 1133 | $row = Database::fetch_array($rs, 'ASSOC'); |
1134 | 1134 | if (isset($row['user_id'])) { |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | |
1189 | 1189 | $items = $topic['count']; |
1190 | 1190 | $reply_label = ($items == 1) ? get_lang('GroupReply') : get_lang('GroupReplies'); |
1191 | - $label = '<i class="fa fa-envelope"></i> ' . $items . ' ' . $reply_label; |
|
1191 | + $label = '<i class="fa fa-envelope"></i> '.$items.' '.$reply_label; |
|
1192 | 1192 | $topic['title'] = trim($topic['title']); |
1193 | 1193 | |
1194 | 1194 | if (empty($topic['title'])) { |
@@ -1200,31 +1200,31 @@ discard block |
||
1200 | 1200 | 'h4', |
1201 | 1201 | Display::url( |
1202 | 1202 | Security::remove_XSS($topic['title'], STUDENT, true), |
1203 | - api_get_path(WEB_CODE_PATH) . 'social/group_topics.php?id=' . $group_id . '&topic_id=' . $topic['id'] |
|
1203 | + api_get_path(WEB_CODE_PATH).'social/group_topics.php?id='.$group_id.'&topic_id='.$topic['id'] |
|
1204 | 1204 | ), array('class' => 'title') |
1205 | 1205 | ); |
1206 | 1206 | $actions = ''; |
1207 | 1207 | if ($my_group_role == GROUP_USER_PERMISSION_ADMIN || |
1208 | 1208 | $my_group_role == GROUP_USER_PERMISSION_MODERATOR |
1209 | 1209 | ) { |
1210 | - $actions = '<br />' . Display::url(get_lang('Delete'), api_get_path(WEB_CODE_PATH) . 'social/group_topics.php?action=delete&id=' . $group_id . '&topic_id=' . $topic['id'], array('class' => 'btn btn-default')); |
|
1210 | + $actions = '<br />'.Display::url(get_lang('Delete'), api_get_path(WEB_CODE_PATH).'social/group_topics.php?action=delete&id='.$group_id.'&topic_id='.$topic['id'], array('class' => 'btn btn-default')); |
|
1211 | 1211 | } |
1212 | 1212 | |
1213 | 1213 | $date = ''; |
1214 | 1214 | if ($topic['send_date'] != $topic['update_date']) { |
1215 | 1215 | if (!empty($topic['update_date'])) { |
1216 | - $date .= '<i class="fa fa-calendar"></i> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']); |
|
1216 | + $date .= '<i class="fa fa-calendar"></i> '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']); |
|
1217 | 1217 | } |
1218 | 1218 | } else { |
1219 | - $date .= '<i class="fa fa-calendar"></i> ' . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']); |
|
1219 | + $date .= '<i class="fa fa-calendar"></i> '.get_lang('Created').' '.date_to_str_ago($topic['send_date']); |
|
1220 | 1220 | } |
1221 | - $html .= '<div class="date">' . $label . ' - ' . $date . $actions . '</div>'; |
|
1221 | + $html .= '<div class="date">'.$label.' - '.$date.$actions.'</div>'; |
|
1222 | 1222 | $html .= '</div>'; |
1223 | 1223 | |
1224 | 1224 | $image = $user_sender_info['avatar']; |
1225 | 1225 | |
1226 | - $user_info = '<div class="author"><img class="img-responsive img-circle" src="' . $image . '" alt="' . $name . '" width="64" height="64" title="' . $name . '" /></div>'; |
|
1227 | - $user_info .= '<div class="name"><a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $topic['user_sender_id'] . '">' . $name . ' </a></div>'; |
|
1226 | + $user_info = '<div class="author"><img class="img-responsive img-circle" src="'.$image.'" alt="'.$name.'" width="64" height="64" title="'.$name.'" /></div>'; |
|
1227 | + $user_info .= '<div class="name"><a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$topic['user_sender_id'].'">'.$name.' </a></div>'; |
|
1228 | 1228 | |
1229 | 1229 | $html .= '<div class="col-xs-4 col-md-2">'; |
1230 | 1230 | $html .= $user_info; |
@@ -1302,7 +1302,7 @@ discard block |
||
1302 | 1302 | 'group_id' => $group_id, |
1303 | 1303 | 'message_id' => $main_message['id'], |
1304 | 1304 | 'action' => 'edit_message_group', |
1305 | - 'anchor_topic' => 'topic_' . $main_message['id'], |
|
1305 | + 'anchor_topic' => 'topic_'.$main_message['id'], |
|
1306 | 1306 | 'topics_page_nr' => $topic_page_nr, |
1307 | 1307 | 'items_page_nr' => $items_page_nr, |
1308 | 1308 | 'topic_id' => $main_message['id'] |
@@ -1310,7 +1310,7 @@ discard block |
||
1310 | 1310 | if (api_is_platform_admin()) { |
1311 | 1311 | $links .= Display::url( |
1312 | 1312 | Display::returnFontAwesomeIcon('trash'), |
1313 | - 'group_topics.php?action=delete&id=' . $group_id . '&topic_id=' . $topic_id, |
|
1313 | + 'group_topics.php?action=delete&id='.$group_id.'&topic_id='.$topic_id, |
|
1314 | 1314 | [ |
1315 | 1315 | 'class' => 'btn btn-default' |
1316 | 1316 | ] |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | 'group_id' => $group_id, |
1336 | 1336 | 'message_id' => $main_message['id'], |
1337 | 1337 | 'action' => 'reply_message_group', |
1338 | - 'anchor_topic' => 'topic_' . $main_message['id'], |
|
1338 | + 'anchor_topic' => 'topic_'.$main_message['id'], |
|
1339 | 1339 | 'topics_page_nr' => $topic_page_nr, |
1340 | 1340 | 'topic_id' => $main_message['id'] |
1341 | 1341 | ]); |
@@ -1353,31 +1353,31 @@ discard block |
||
1353 | 1353 | $links .= '</div>'; |
1354 | 1354 | $links .= '</div>'; |
1355 | 1355 | |
1356 | - $title = '<h4>' . Security::remove_XSS($main_message['title'], STUDENT, true) . $links . '</h4>'; |
|
1356 | + $title = '<h4>'.Security::remove_XSS($main_message['title'], STUDENT, true).$links.'</h4>'; |
|
1357 | 1357 | |
1358 | 1358 | $userPicture = $user_sender_info['avatar']; |
1359 | 1359 | $main_content .= '<div class="row">'; |
1360 | 1360 | $main_content .= '<div class="col-md-2">'; |
1361 | 1361 | $main_content .= '<div class="avatar-author">'; |
1362 | - $main_content .= '<img width="60px" src="' . $userPicture . '" alt="' . $name . '" class="img-responsive img-circle" title="' . $name . '" />'; |
|
1362 | + $main_content .= '<img width="60px" src="'.$userPicture.'" alt="'.$name.'" class="img-responsive img-circle" title="'.$name.'" />'; |
|
1363 | 1363 | $main_content .= '</div>'; |
1364 | 1364 | $main_content .= '</div>'; |
1365 | 1365 | |
1366 | 1366 | $date = ''; |
1367 | 1367 | if ($main_message['send_date'] != $main_message['update_date']) { |
1368 | 1368 | if (!empty($main_message['update_date'])) { |
1369 | - $date = '<div class="date"> '. Display::returnFontAwesomeIcon('calendar') .' ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($main_message['update_date']) . '</div>'; |
|
1369 | + $date = '<div class="date"> '.Display::returnFontAwesomeIcon('calendar').' '.get_lang('LastUpdate').' '.date_to_str_ago($main_message['update_date']).'</div>'; |
|
1370 | 1370 | } |
1371 | 1371 | } else { |
1372 | - $date = '<div class="date"> ' . Display::returnFontAwesomeIcon('calendar') .' ' . get_lang('Created') . ' ' . date_to_str_ago($main_message['send_date']) . '</div>'; |
|
1372 | + $date = '<div class="date"> '.Display::returnFontAwesomeIcon('calendar').' '.get_lang('Created').' '.date_to_str_ago($main_message['send_date']).'</div>'; |
|
1373 | 1373 | } |
1374 | - $attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>'; |
|
1374 | + $attachment = '<div class="message-attach">'.(!empty($files_attachments) ? implode('<br />', $files_attachments) : '').'</div>'; |
|
1375 | 1375 | $main_content .= '<div class="col-md-10">'; |
1376 | - $user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $main_message['user_sender_id'] . '">' . $name . '</a>'; |
|
1376 | + $user_link = '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$main_message['user_sender_id'].'">'.$name.'</a>'; |
|
1377 | 1377 | $main_content .= '<div class="message-content"> '; |
1378 | - $main_content .= '<div class="username">' . $user_link . '</div>'; |
|
1379 | - $main_content .= $date ; |
|
1380 | - $main_content .= '<div class="message">'. $main_message['content'] . $attachment . '</div></div>'; |
|
1378 | + $main_content .= '<div class="username">'.$user_link.'</div>'; |
|
1379 | + $main_content .= $date; |
|
1380 | + $main_content .= '<div class="message">'.$main_message['content'].$attachment.'</div></div>'; |
|
1381 | 1381 | $main_content .= '</div>'; |
1382 | 1382 | $main_content .= '</div>'; |
1383 | 1383 | |
@@ -1398,7 +1398,7 @@ discard block |
||
1398 | 1398 | if (empty($topic['id'])) { |
1399 | 1399 | continue; |
1400 | 1400 | } |
1401 | - $items_page_nr = isset($_GET['items_' . $topic['id'] . '_page_nr']) ? intval($_GET['items_' . $topic['id'] . '_page_nr']) : null; |
|
1401 | + $items_page_nr = isset($_GET['items_'.$topic['id'].'_page_nr']) ? intval($_GET['items_'.$topic['id'].'_page_nr']) : null; |
|
1402 | 1402 | $links = ''; |
1403 | 1403 | $links .= '<div class="pull-right">'; |
1404 | 1404 | $html_items = ''; |
@@ -1408,36 +1408,36 @@ discard block |
||
1408 | 1408 | |
1409 | 1409 | $links .= '<div class="btn-group btn-group-sm">'; |
1410 | 1410 | if (($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR) || $topic['user_sender_id'] == $current_user_id) { |
1411 | - $links .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . $current_user_id . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=edit_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn btn-default" data-size="lg" data-title="' . get_lang('Edit') . '" title="' . get_lang('Edit') . '">' . |
|
1412 | - Display::returnFontAwesomeIcon('pencil') . '</a>'; |
|
1411 | + $links .= '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?height=400&width=800&&user_friend='.$current_user_id.'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=edit_message_group&anchor_topic=topic_'.$topic_id.'&topics_page_nr='.$topic_page_nr.'&items_page_nr='.$items_page_nr.'&topic_id='.$topic_id.'" class="ajax btn btn-default" data-size="lg" data-title="'.get_lang('Edit').'" title="'.get_lang('Edit').'">'. |
|
1412 | + Display::returnFontAwesomeIcon('pencil').'</a>'; |
|
1413 | 1413 | } |
1414 | - $links .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . api_get_user_id() . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=reply_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn btn-default" data-size="lg" data-title="' . get_lang('Reply') . '" title="' . get_lang('Reply') . '">'; |
|
1415 | - $links .= Display::returnFontAwesomeIcon('commenting') . '</a>'; |
|
1414 | + $links .= '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?height=400&width=800&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=reply_message_group&anchor_topic=topic_'.$topic_id.'&topics_page_nr='.$topic_page_nr.'&items_page_nr='.$items_page_nr.'&topic_id='.$topic_id.'" class="ajax btn btn-default" data-size="lg" data-title="'.get_lang('Reply').'" title="'.get_lang('Reply').'">'; |
|
1415 | + $links .= Display::returnFontAwesomeIcon('commenting').'</a>'; |
|
1416 | 1416 | $links .= '</div>'; |
1417 | 1417 | $links .= '</div>'; |
1418 | 1418 | |
1419 | 1419 | $userPicture = $user_sender_info['avatar']; |
1420 | - $user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $topic['user_sender_id'] . '">' . $name . ' </a>'; |
|
1420 | + $user_link = '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$topic['user_sender_id'].'">'.$name.' </a>'; |
|
1421 | 1421 | $html_items .= '<div class="row">'; |
1422 | 1422 | $html_items .= '<div class="col-md-2">'; |
1423 | - $html_items .= '<div class="avatar-author"><img width="60px" src="' . $userPicture . '" alt="' . $name . '" class="img-responsive img-circle" title="' . $name . '" /></div>'; |
|
1423 | + $html_items .= '<div class="avatar-author"><img width="60px" src="'.$userPicture.'" alt="'.$name.'" class="img-responsive img-circle" title="'.$name.'" /></div>'; |
|
1424 | 1424 | $html_items .= '</div>'; |
1425 | 1425 | |
1426 | 1426 | $date = ''; |
1427 | 1427 | if ($topic['send_date'] != $topic['update_date']) { |
1428 | 1428 | if (!empty($topic['update_date'])) { |
1429 | - $date = '<div class="date"> ' . Display::returnFontAwesomeIcon('calendar') .' '. get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']) . '</div>'; |
|
1429 | + $date = '<div class="date"> '.Display::returnFontAwesomeIcon('calendar').' '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'</div>'; |
|
1430 | 1430 | } |
1431 | 1431 | } else { |
1432 | - $date = '<div class="date"> ' . Display::returnFontAwesomeIcon('calendar') . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']) . '</div>'; |
|
1432 | + $date = '<div class="date"> '.Display::returnFontAwesomeIcon('calendar').get_lang('Created').' '.date_to_str_ago($topic['send_date']).'</div>'; |
|
1433 | 1433 | } |
1434 | - $attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>'; |
|
1434 | + $attachment = '<div class="message-attach">'.(!empty($files_attachments) ? implode('<br />', $files_attachments) : '').'</div>'; |
|
1435 | 1435 | $html_items .= '<div class="col-md-10">'; |
1436 | 1436 | $html_items .= '<div class="message-content">'; |
1437 | 1437 | $html_items .= $links; |
1438 | - $html_items .= '<div class="username">' . $user_link . '</div>'; |
|
1438 | + $html_items .= '<div class="username">'.$user_link.'</div>'; |
|
1439 | 1439 | $html_items .= $date; |
1440 | - $html_items .= '<div class="message">' . Security::remove_XSS($topic['content'], STUDENT, true) . '</div>' . $attachment . '</div>'; |
|
1440 | + $html_items .= '<div class="message">'.Security::remove_XSS($topic['content'], STUDENT, true).'</div>'.$attachment.'</div>'; |
|
1441 | 1441 | $html_items .= '</div>'; |
1442 | 1442 | $html_items .= '</div>'; |
1443 | 1443 | |
@@ -1449,8 +1449,8 @@ discard block |
||
1449 | 1449 | $indent = intval($topic['indent_cnt']) * $base_padding + $base_padding; |
1450 | 1450 | } |
1451 | 1451 | |
1452 | - $html_items = Display::div($html_items, array('class' => 'message-post', 'id' => 'msg_' . $topic['id'])); |
|
1453 | - $html_items = Display::div($html_items, array('class' => '', 'style' => 'margin-left:' . $indent . 'px')); |
|
1452 | + $html_items = Display::div($html_items, array('class' => 'message-post', 'id' => 'msg_'.$topic['id'])); |
|
1453 | + $html_items = Display::div($html_items, array('class' => '', 'style' => 'margin-left:'.$indent.'px')); |
|
1454 | 1454 | $array_html_items[] = array($html_items); |
1455 | 1455 | } |
1456 | 1456 | // grids for items with paginations |
@@ -1463,7 +1463,7 @@ discard block |
||
1463 | 1463 | ); |
1464 | 1464 | if (!empty($array_html_items)) { |
1465 | 1465 | $html .= Display::return_sortable_grid( |
1466 | - 'items_' . $topic['id'], |
|
1466 | + 'items_'.$topic['id'], |
|
1467 | 1467 | array(), |
1468 | 1468 | $array_html_items, |
1469 | 1469 | $options, |
@@ -1554,14 +1554,14 @@ discard block |
||
1554 | 1554 | $rs_file = Database::query($sql); |
1555 | 1555 | if (Database::num_rows($rs_file) > 0) { |
1556 | 1556 | $attach_icon = Display::return_icon('attachment.gif', ''); |
1557 | - $archiveURL = api_get_path(WEB_CODE_PATH) . 'messages/download.php?type=' . $type . '&file='; |
|
1557 | + $archiveURL = api_get_path(WEB_CODE_PATH).'messages/download.php?type='.$type.'&file='; |
|
1558 | 1558 | while ($row_file = Database::fetch_array($rs_file)) { |
1559 | 1559 | $archiveFile = $row_file['path']; |
1560 | 1560 | $filename = $row_file['filename']; |
1561 | 1561 | $filesize = format_file_size($row_file['size']); |
1562 | 1562 | $filecomment = Security::remove_XSS($row_file['comment']); |
1563 | 1563 | $filename = Security::remove_XSS($filename); |
1564 | - $links_attach_file[] = $attach_icon . ' <a href="' . $archiveURL . $archiveFile . '">' . $filename . '</a> (' . $filesize . ')' . (!empty($filecomment) ? ' - <i>' . $filecomment . '</i>' : ''); |
|
1564 | + $links_attach_file[] = $attach_icon.' <a href="'.$archiveURL.$archiveFile.'">'.$filename.'</a> ('.$filesize.')'.(!empty($filecomment) ? ' - <i>'.$filecomment.'</i>' : ''); |
|
1565 | 1565 | } |
1566 | 1566 | } |
1567 | 1567 | } |
@@ -1580,7 +1580,7 @@ discard block |
||
1580 | 1580 | $sql = "SELECT * FROM $tbl_message |
1581 | 1581 | WHERE |
1582 | 1582 | id = '$message_id' AND |
1583 | - msg_status <> '" . MESSAGE_STATUS_DELETED . "' "; |
|
1583 | + msg_status <> '".MESSAGE_STATUS_DELETED."' "; |
|
1584 | 1584 | $res = Database::query($sql); |
1585 | 1585 | $item = array(); |
1586 | 1586 | if (Database::num_rows($res) > 0) { |
@@ -1708,7 +1708,7 @@ discard block |
||
1708 | 1708 | |
1709 | 1709 | Session::write('message_sent_search_keyword', $keyword); |
1710 | 1710 | |
1711 | - $success = get_lang('SelectedMessagesDeleted') . ' </b><br /><a href="outbox.php?' . $social_link . '">' . get_lang('BackToOutbox') . '</a>'; |
|
1711 | + $success = get_lang('SelectedMessagesDeleted').' </b><br /><a href="outbox.php?'.$social_link.'">'.get_lang('BackToOutbox').'</a>'; |
|
1712 | 1712 | |
1713 | 1713 | $html = null; |
1714 | 1714 | if (isset($_REQUEST['action'])) { |
@@ -1816,7 +1816,7 @@ discard block |
||
1816 | 1816 | ON m.user_sender_id = u.user_id |
1817 | 1817 | WHERE |
1818 | 1818 | m.user_receiver_id = $userId AND |
1819 | - m.msg_status = " . MESSAGE_STATUS_UNREAD . " |
|
1819 | + m.msg_status = ".MESSAGE_STATUS_UNREAD." |
|
1820 | 1820 | AND m.id > $lastId |
1821 | 1821 | ORDER BY m.send_date DESC"; |
1822 | 1822 | |
@@ -1888,11 +1888,11 @@ discard block |
||
1888 | 1888 | $tplMailBody = new Template(null, false, false, false, false, false, false); |
1889 | 1889 | $tplMailBody->assign('user', $user); |
1890 | 1890 | $tplMailBody->assign('is_western_name_order', api_is_western_name_order()); |
1891 | - $tplMailBody->assign('manageUrl', api_get_path(WEB_CODE_PATH) . 'admin/user_edit.php?user_id=' . $user->getId()); |
|
1891 | + $tplMailBody->assign('manageUrl', api_get_path(WEB_CODE_PATH).'admin/user_edit.php?user_id='.$user->getId()); |
|
1892 | 1892 | |
1893 | 1893 | $layoutContent = $tplMailBody->get_template('mail/new_user_mail_to_admin.tpl'); |
1894 | 1894 | |
1895 | - $emailsubject = '[' . get_lang('UserRegistered') . '] ' . $user->getUsername(); |
|
1895 | + $emailsubject = '['.get_lang('UserRegistered').'] '.$user->getUsername(); |
|
1896 | 1896 | $emailbody = $tplMailBody->fetch($layoutContent); |
1897 | 1897 | |
1898 | 1898 | $admins = UserManager::get_all_administrators(); |
@@ -1923,8 +1923,8 @@ discard block |
||
1923 | 1923 | */ |
1924 | 1924 | public static function failedSentMailErrors() |
1925 | 1925 | { |
1926 | - $base = api_get_path(SYS_ARCHIVE_PATH) . 'mail/'; |
|
1927 | - $mailq = $base . 'mailq'; |
|
1926 | + $base = api_get_path(SYS_ARCHIVE_PATH).'mail/'; |
|
1927 | + $mailq = $base.'mailq'; |
|
1928 | 1928 | |
1929 | 1929 | if (!file_exists($mailq) || !is_readable($mailq)) { |
1930 | 1930 | return false; |
@@ -1945,7 +1945,7 @@ discard block |
||
1945 | 1945 | $mail_queue[$i]['code'] = $codeMatches[2]; |
1946 | 1946 | } |
1947 | 1947 | |
1948 | - $fullMail = $base . $mail_queue[$i]['code']; |
|
1948 | + $fullMail = $base.$mail_queue[$i]['code']; |
|
1949 | 1949 | $mailFile = fopen($fullMail, 'r'); |
1950 | 1950 | |
1951 | 1951 | //Get the reason of mail fail |
@@ -1968,7 +1968,7 @@ discard block |
||
1968 | 1968 | |
1969 | 1969 | //Get the time of mail fail |
1970 | 1970 | if (preg_match('/^\s?(\d+)(\D+)\s+(.*)$/', $line, $timeMatches)) { |
1971 | - $mail_queue[$i]['time'] = $timeMatches[1] . $timeMatches[2]; |
|
1971 | + $mail_queue[$i]['time'] = $timeMatches[1].$timeMatches[2]; |
|
1972 | 1972 | } elseif (preg_match('/^(\s+)((.*)@(.*))\s+(.*)$/', $line, $emailMatches)) { |
1973 | 1973 | $mail_queue[$i]['mail'] = $emailMatches[2]; |
1974 | 1974 | $i++; |