@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | $_user = api_get_user_info(); |
| 51 | 51 | $courseInfo = api_get_course_info(); |
| 52 | 52 | $courseId = $courseInfo['real_id']; |
| 53 | -$course_dir = $courseInfo['directory'] . '/document'; |
|
| 53 | +$course_dir = $courseInfo['directory'].'/document'; |
|
| 54 | 54 | $sys_course_path = api_get_path(SYS_COURSE_PATH); |
| 55 | -$base_work_dir = $sys_course_path . $course_dir; |
|
| 56 | -$http_www = api_get_path(WEB_COURSE_PATH).$courseInfo['directory'] . '/document'; |
|
| 55 | +$base_work_dir = $sys_course_path.$course_dir; |
|
| 56 | +$http_www = api_get_path(WEB_COURSE_PATH).$courseInfo['directory'].'/document'; |
|
| 57 | 57 | $document_path = $base_work_dir; |
| 58 | 58 | $usePpt2lp = api_get_setting('service_ppt2lp', 'active') == 'true'; |
| 59 | 59 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $certificateId |
| 239 | 239 | ); |
| 240 | 240 | Display::addFlash(Display::return_message( |
| 241 | - get_lang('DocDeleted') . ': ' . $documentInfo['title'], |
|
| 241 | + get_lang('DocDeleted').': '.$documentInfo['title'], |
|
| 242 | 242 | 'success' |
| 243 | 243 | )); |
| 244 | 244 | } else { |
@@ -427,11 +427,9 @@ discard block |
||
| 427 | 427 | case 'convertToPdf': |
| 428 | 428 | // PDF format as target by default |
| 429 | 429 | $formatTarget = $_REQUEST['formatTarget'] ? |
| 430 | - strtolower(Security::remove_XSS($_REQUEST['formatTarget'])) : |
|
| 431 | - 'pdf'; |
|
| 430 | + strtolower(Security::remove_XSS($_REQUEST['formatTarget'])) : 'pdf'; |
|
| 432 | 431 | $formatType = $_REQUEST['formatType'] ? |
| 433 | - strtolower(Security::remove_XSS($_REQUEST['formatType'])) : |
|
| 434 | - 'text'; |
|
| 432 | + strtolower(Security::remove_XSS($_REQUEST['formatType'])) : 'text'; |
|
| 435 | 433 | // Get the document data from the ID |
| 436 | 434 | $document_info = DocumentManager::get_document_data_by_id( |
| 437 | 435 | $document_id, |
@@ -439,8 +437,8 @@ discard block |
||
| 439 | 437 | true, |
| 440 | 438 | $session_id |
| 441 | 439 | ); |
| 442 | - $file = $sys_course_path . $courseInfo['directory'] . |
|
| 443 | - '/document' . $document_info['path']; |
|
| 440 | + $file = $sys_course_path.$courseInfo['directory']. |
|
| 441 | + '/document'.$document_info['path']; |
|
| 444 | 442 | $fileInfo = pathinfo($file); |
| 445 | 443 | if ($fileInfo['extension'] == $formatTarget) { |
| 446 | 444 | Display::addFlash(Display::return_message( |
@@ -471,9 +469,9 @@ discard block |
||
| 471 | 469 | 'warning' |
| 472 | 470 | )); |
| 473 | 471 | } else { |
| 474 | - $convertedFile = $fileInfo['dirname'] . DIRECTORY_SEPARATOR . |
|
| 475 | - $fileInfo['filename'] . '_from_' . $fileInfo['extension'] . |
|
| 476 | - '.' . $formatTarget; |
|
| 472 | + $convertedFile = $fileInfo['dirname'].DIRECTORY_SEPARATOR. |
|
| 473 | + $fileInfo['filename'].'_from_'.$fileInfo['extension']. |
|
| 474 | + '.'.$formatTarget; |
|
| 477 | 475 | $convertedTitle = $document_info['title']; |
| 478 | 476 | $obj = new OpenofficePresentation(true); |
| 479 | 477 | if (file_exists($convertedFile)) { |
@@ -498,13 +496,13 @@ discard block |
||
| 498 | 496 | $gidReq = Security::remove_XSS($_GET['gidReq']); |
| 499 | 497 | $file_link = Display::url( |
| 500 | 498 | get_lang('SeeFile'), |
| 501 | - api_get_path(WEB_CODE_PATH) . |
|
| 502 | - 'document/showinframes.php?' . 'cidReq=' . $cidReq . |
|
| 503 | - '&id_session=' . $id_session . '&' . |
|
| 504 | - 'gidReq=' . $gidReq . '&id=' . current($result) |
|
| 499 | + api_get_path(WEB_CODE_PATH). |
|
| 500 | + 'document/showinframes.php?'.'cidReq='.$cidReq. |
|
| 501 | + '&id_session='.$id_session.'&'. |
|
| 502 | + 'gidReq='.$gidReq.'&id='.current($result) |
|
| 505 | 503 | ); |
| 506 | 504 | Display::addFlash(Display::return_message( |
| 507 | - get_lang('CopyMade') . ' ' . $file_link, |
|
| 505 | + get_lang('CopyMade').' '.$file_link, |
|
| 508 | 506 | 'confirmation', |
| 509 | 507 | false |
| 510 | 508 | )); |
@@ -661,7 +659,7 @@ discard block |
||
| 661 | 659 | $new_content_html |
| 662 | 660 | ); |
| 663 | 661 | $new_content_html = str_replace( |
| 664 | - SYS_CODE_PATH . 'img/', |
|
| 662 | + SYS_CODE_PATH.'img/', |
|
| 665 | 663 | api_get_path(WEB_IMG_PATH), |
| 666 | 664 | $new_content_html |
| 667 | 665 | ); |
@@ -718,11 +716,11 @@ discard block |
||
| 718 | 716 | $("#convertSelect").change(function() { |
| 719 | 717 | var formatTarget = $(this).val(); |
| 720 | 718 | window.location.href = "'. |
| 721 | - api_get_self() . '?' . api_get_cidreq() . |
|
| 722 | - '&curdirpath=' . $curdirpath . |
|
| 723 | - '&action=convertToPdf&formatTarget=' . |
|
| 724 | - '" + formatTarget + "&id=" + id + "&' . |
|
| 725 | - api_get_cidreq() . '&formatType=" + format; |
|
| 719 | + api_get_self().'?'.api_get_cidreq(). |
|
| 720 | + '&curdirpath='.$curdirpath. |
|
| 721 | + '&action=convertToPdf&formatTarget='. |
|
| 722 | + '" + formatTarget + "&id=" + id + "&'. |
|
| 723 | + api_get_cidreq().'&formatType=" + format; |
|
| 726 | 724 | }); |
| 727 | 725 | $("#convertModal").on("hidden", function(){ |
| 728 | 726 | $("." + format + "FormatType").hide(); |
@@ -1054,7 +1052,7 @@ discard block |
||
| 1054 | 1052 | update_db_info( |
| 1055 | 1053 | 'update', |
| 1056 | 1054 | $document_to_move['path'], |
| 1057 | - $moveTo . '/' . basename($document_to_move['path']) |
|
| 1055 | + $moveTo.'/'.basename($document_to_move['path']) |
|
| 1058 | 1056 | ); |
| 1059 | 1057 | |
| 1060 | 1058 | //update database item property |
@@ -1172,7 +1170,7 @@ discard block |
||
| 1172 | 1170 | )) { |
| 1173 | 1171 | $messages .= Display::return_message(get_lang('VisibilityChanged').': '.$data['title'], 'confirmation'); |
| 1174 | 1172 | } else { |
| 1175 | - $messages .= Display::return_message(get_lang('ViModProb'), 'error'); |
|
| 1173 | + $messages .= Display::return_message(get_lang('ViModProb'), 'error'); |
|
| 1176 | 1174 | } |
| 1177 | 1175 | break; |
| 1178 | 1176 | case 'delete': |
@@ -1284,7 +1282,7 @@ discard block |
||
| 1284 | 1282 | |
| 1285 | 1283 | if (!empty($newFolderData)) { |
| 1286 | 1284 | $message = Display::return_message( |
| 1287 | - get_lang('DirCr') . ' ' . $newFolderData['title'], |
|
| 1285 | + get_lang('DirCr').' '.$newFolderData['title'], |
|
| 1288 | 1286 | 'confirmation' |
| 1289 | 1287 | ); |
| 1290 | 1288 | } else { |
@@ -1369,27 +1367,27 @@ discard block |
||
| 1369 | 1367 | |
| 1370 | 1368 | // Create the form that asks for the directory name |
| 1371 | 1369 | $templateForm .= ' |
| 1372 | - <form name="set_document_as_new_template" class="form-horizontal" enctype="multipart/form-data" action="' . api_get_self() . '?add_as_template=' . $document_id_for_template . '" method="post"> |
|
| 1370 | + <form name="set_document_as_new_template" class="form-horizontal" enctype="multipart/form-data" action="' . api_get_self().'?add_as_template='.$document_id_for_template.'" method="post"> |
|
| 1373 | 1371 | <fieldset> |
| 1374 | - <legend>' . get_lang('AddAsTemplate') . '</legend> |
|
| 1372 | + <legend>' . get_lang('AddAsTemplate').'</legend> |
|
| 1375 | 1373 | <div class="form-group"> |
| 1376 | - <label for="template_title" class="col-sm-2 control-label">' . get_lang('TemplateName') . '</label> |
|
| 1374 | + <label for="template_title" class="col-sm-2 control-label">' . get_lang('TemplateName').'</label> |
|
| 1377 | 1375 | <div class="col-sm-10"> |
| 1378 | 1376 | <input type="text" class="form-control" id="template_title" name="template_title"> |
| 1379 | 1377 | </div> |
| 1380 | 1378 | </div> |
| 1381 | 1379 | <div class="form-group"> |
| 1382 | - <label for="template_image" class="col-sm-2 control-label">' . get_lang('TemplateImage') . '</label> |
|
| 1380 | + <label for="template_image" class="col-sm-2 control-label">' . get_lang('TemplateImage').'</label> |
|
| 1383 | 1381 | <div class="col-sm-10"> |
| 1384 | 1382 | <input type="file" name="template_image" id="template_image"> |
| 1385 | 1383 | </div> |
| 1386 | 1384 | </div> |
| 1387 | 1385 | <div class="form-group"> |
| 1388 | 1386 | <div class="col-sm-offset-2 col-sm-10"> |
| 1389 | - <button type="submit" name="create_template" class="btn btn-primary">' . get_lang('CreateTemplate') . '</button> |
|
| 1387 | + <button type="submit" name="create_template" class="btn btn-primary">' . get_lang('CreateTemplate').'</button> |
|
| 1390 | 1388 | </div> |
| 1391 | 1389 | </div> |
| 1392 | - <input type="hidden" name="curdirpath" value="' . $curdirpath . '" /> |
|
| 1390 | + <input type="hidden" name="curdirpath" value="' . $curdirpath.'" /> |
|
| 1393 | 1391 | </fieldset> |
| 1394 | 1392 | </form> |
| 1395 | 1393 | <hr> |
@@ -2035,18 +2033,18 @@ discard block |
||
| 2035 | 2033 | <div class="modal-dialog"> |
| 2036 | 2034 | <div class="modal-content"> |
| 2037 | 2035 | <div class="modal-header" style="text-align: center;"> |
| 2038 | - <button type="button" class="close" data-dismiss="modal" aria-label="' . get_lang('Close') . '"> |
|
| 2036 | + <button type="button" class="close" data-dismiss="modal" aria-label="' . get_lang('Close').'"> |
|
| 2039 | 2037 | <span aria-hidden="true">×</span> |
| 2040 | 2038 | </button> |
| 2041 | - <h4 class="modal-title">' . get_lang('Convert') . '</h4> |
|
| 2039 | + <h4 class="modal-title">' . get_lang('Convert').'</h4> |
|
| 2042 | 2040 | </div> |
| 2043 | 2041 | <div class="modal-body"> |
| 2044 | 2042 | <form action="#" class="form-horizontal"> |
| 2045 | 2043 | <div class="form-group"> |
| 2046 | - <label class="col-sm-4 control-label" for="convertSelect">' . get_lang('ConvertFormats') . '</label> |
|
| 2044 | + <label class="col-sm-4 control-label" for="convertSelect">' . get_lang('ConvertFormats').'</label> |
|
| 2047 | 2045 | <div class="col-sm-8"> |
| 2048 | 2046 | <select id="convertSelect"> |
| 2049 | - <option value="">' . get_lang('Select') . '</option> |
|
| 2047 | + <option value="">' . get_lang('Select').'</option> |
|
| 2050 | 2048 | <option value="pdf"> |
| 2051 | 2049 | PDF - Portable Document File |
| 2052 | 2050 | </option> |
@@ -2065,7 +2063,7 @@ discard block |
||
| 2065 | 2063 | </form> |
| 2066 | 2064 | </div> |
| 2067 | 2065 | <div class="modal-footer"> |
| 2068 | - <button type="button" class="btn btn-default" data-dismiss="modal">' . get_lang('Close') . '</button> |
|
| 2066 | + <button type="button" class="btn btn-default" data-dismiss="modal">' . get_lang('Close').'</button> |
|
| 2069 | 2067 | </div> |
| 2070 | 2068 | </div> |
| 2071 | 2069 | </div>'; |