Completed
Pull Request — 1.11.x (#1352)
by José
38:59
created
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Wiki.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
                 '-',
57 57
                 'Find'
58 58
             ],
59
-            ['Wikilink','Link','Unlink','Anchor'],
60
-            ['Image','Video','Flash','Oembed','Youtube','Audio','Asciimath'],
61
-            ['Table','HorizontalRule','Smiley','SpecialChar','leaflet'],
62
-            ['Format','Font','FontSize'],
63
-            ['Bold','Italic','Underline'],
59
+            ['Wikilink', 'Link', 'Unlink', 'Anchor'],
60
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath'],
61
+            ['Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'leaflet'],
62
+            ['Format', 'Font', 'FontSize'],
63
+            ['Bold', 'Italic', 'Underline'],
64 64
             [
65 65
                 'Subscript',
66 66
                 'Superscript',
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
         return [
95 95
             ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
96 96
             ['Undo', 'Redo'],
97
-            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath', 'Asciisvg'],
97
+            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
98 98
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
99 99
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
100
-            ['Styles','Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
100
+            ['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
101 101
             api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
102 102
             ['Toolbarswitch']
103 103
         ];
Please login to merge, or discard this patch.
main/inc/lib/upload.xajax.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 include(dirname(__FILE__).'/../global.inc.php');
9 9
 $xajax_upload = new Xajax();
10
-$xajax_upload -> registerFunction ('updateProgress');
10
+$xajax_upload -> registerFunction('updateProgress');
11 11
 $xajax_upload -> processRequests();
12 12
 
13 13
 /**
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 
20 20
 	$objResponse = new xajaxResponse();
21 21
 	$ul_info = uploadprogress_get_info($upload_id);
22
-	$percent = intval($ul_info['bytes_uploaded']*100/$ul_info['bytes_total']);
23
-	if($waitAfterupload && $ul_info['est_sec']<2) {
22
+	$percent = intval($ul_info['bytes_uploaded'] * 100 / $ul_info['bytes_total']);
23
+	if ($waitAfterupload && $ul_info['est_sec'] < 2) {
24 24
 		$percent = 100;
25
-		$objResponse->addAssign($div_id.'_label' , 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
26
-		$objResponse->addAssign($div_id.'_waiter_frame','innerHTML', Display::return_icon('progress_bar.gif'));
25
+		$objResponse->addAssign($div_id.'_label', 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
26
+		$objResponse->addAssign($div_id.'_waiter_frame', 'innerHTML', Display::return_icon('progress_bar.gif'));
27 27
 		$objResponse->addScript('clearInterval("myUpload.__progress_bar_interval")');
28 28
 	}
29 29
 	$objResponse->addAssign($div_id.'_label', 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,17 +17,17 @@
 block discarded – undo
17 17
  */
18 18
 function updateProgress($div_id, $upload_id, $waitAfterupload = false) {
19 19
 
20
-	$objResponse = new xajaxResponse();
21
-	$ul_info = uploadprogress_get_info($upload_id);
22
-	$percent = intval($ul_info['bytes_uploaded']*100/$ul_info['bytes_total']);
23
-	if($waitAfterupload && $ul_info['est_sec']<2) {
24
-		$percent = 100;
25
-		$objResponse->addAssign($div_id.'_label' , 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
26
-		$objResponse->addAssign($div_id.'_waiter_frame','innerHTML', Display::return_icon('progress_bar.gif'));
27
-		$objResponse->addScript('clearInterval("myUpload.__progress_bar_interval")');
28
-	}
29
-	$objResponse->addAssign($div_id.'_label', 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
30
-	$objResponse->addAssign($div_id.'_filled', 'style.width', $percent.'%');
20
+    $objResponse = new xajaxResponse();
21
+    $ul_info = uploadprogress_get_info($upload_id);
22
+    $percent = intval($ul_info['bytes_uploaded']*100/$ul_info['bytes_total']);
23
+    if($waitAfterupload && $ul_info['est_sec']<2) {
24
+        $percent = 100;
25
+        $objResponse->addAssign($div_id.'_label' , 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
26
+        $objResponse->addAssign($div_id.'_waiter_frame','innerHTML', Display::return_icon('progress_bar.gif'));
27
+        $objResponse->addScript('clearInterval("myUpload.__progress_bar_interval")');
28
+    }
29
+    $objResponse->addAssign($div_id.'_label', 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
30
+    $objResponse->addAssign($div_id.'_filled', 'style.width', $percent.'%');
31 31
 
32
-	return $objResponse;
32
+    return $objResponse;
33 33
 }
Please login to merge, or discard this patch.
main/inc/lib/search/tool_processors/link_processor.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 /**
9 9
  * Code
10 10
  */
11
-include_once dirname(__FILE__) . '/../../../global.inc.php';
12
-require_once dirname(__FILE__) . '/search_processor.class.php';
11
+include_once dirname(__FILE__).'/../../../global.inc.php';
12
+require_once dirname(__FILE__).'/search_processor.class.php';
13 13
 
14 14
 /**
15 15
  * Process links before pass it to search listing scripts
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
 
105 105
             $link_id = intval($link_id);
106 106
             $sql = "SELECT insert_user_id FROM $item_property_table
107
-              		WHERE ref = $link_id AND tool = '" . TOOL_LINK . "' AND c_id = $course_id
107
+              		WHERE ref = $link_id AND tool = '".TOOL_LINK."' AND c_id = $course_id
108 108
               		LIMIT 1";
109 109
 
110 110
             $name = get_lang('Links');
111
-            $url = api_get_path(WEB_PATH) . 'main/link/link.php?cidReq=%s';
111
+            $url = api_get_path(WEB_PATH).'main/link/link.php?cidReq=%s';
112 112
             $url = sprintf($url, $course_id_alpha);
113 113
             // Get the image path
114 114
             $thumbnail = Display::returnIconPath('link.png');
Please login to merge, or discard this patch.
main/inc/lib/search/tool_processors/document_processor.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 /**
9 9
  * Code
10 10
  */
11
-include_once dirname(__FILE__) . '/../../../global.inc.php';
12
-require_once dirname(__FILE__) . '/search_processor.class.php';
11
+include_once dirname(__FILE__).'/../../../global.inc.php';
12
+require_once dirname(__FILE__).'/search_processor.class.php';
13 13
 
14 14
 /**
15 15
  * Process documents before pass it to search listing scripts
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             $dk_result = Database::query($sql);
83 83
 
84 84
             $sql = "SELECT insert_user_id FROM       $item_property_table
85
-                    WHERE   ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id
85
+                    WHERE   ref = $doc_id AND tool = '".TOOL_DOCUMENT."' AND c_id = $course_id
86 86
                     LIMIT 1";
87 87
             $name = '';
88 88
             if ($row = Database::fetch_array($dk_result)) {
Please login to merge, or discard this patch.
main/admin/specific_fields_add.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 $tool_name = get_lang('AddSpecificSearchField');
28 28
 
29 29
 if (isset($_GET['action']) && $_GET['action'] === 'edit') {
30
-  $tool_name = get_lang('EditSpecificSearchField');
30
+    $tool_name = get_lang('EditSpecificSearchField');
31 31
 }
32 32
 // Create the form
33 33
 $form = new FormValidator('specific_fields_add');
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@  discard block
 block discarded – undo
32 32
 // Create the form
33 33
 $form = new FormValidator('specific_fields_add');
34 34
 // Field variable name
35
-$form->addElement('hidden','field_id', $fieldId);
36
-$form->addElement('text','field_name',get_lang('FieldName'));
37
-$form->applyFilter('field_name','html_filter');
38
-$form->applyFilter('field_name','trim');
35
+$form->addElement('hidden', 'field_id', $fieldId);
36
+$form->addElement('text', 'field_name', get_lang('FieldName'));
37
+$form->applyFilter('field_name', 'html_filter');
38
+$form->applyFilter('field_name', 'trim');
39 39
 $form->addRule('field_name', get_lang('ThisFieldIsRequired'), 'required');
40 40
 $form->addRule('field_name', get_lang('OnlyLettersAndNumbersAllowed'), 'username');
41
-$form->addRule('field_name', '', 'maxlength',20);
41
+$form->addRule('field_name', '', 'maxlength', 20);
42 42
 
43 43
 // Set default values (only not empty when editing)
44 44
 $defaults = array();
45 45
 if ($fieldId) {
46
-    $form_information = get_specific_field_list(array( 'id' => $fieldId ));
46
+    $form_information = get_specific_field_list(array('id' => $fieldId));
47 47
     $defaults['field_name'] = $form_information[0]['name'];
48 48
 }
49 49
 $form->setDefaults($defaults);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 if ($form->validate()) {
55 55
     $field = $form->exportValues();
56 56
     $field_name = $field['field_name'];
57
-    if (is_numeric($field['field_id']) && $field['field_id']<>0 && !empty($field['field_id'])) {
57
+    if (is_numeric($field['field_id']) && $field['field_id'] <> 0 && !empty($field['field_id'])) {
58 58
         edit_specific_field($field['field_id'], $field['field_name']);
59 59
         $message = get_lang('FieldEdited');
60 60
     } else {
Please login to merge, or discard this patch.
main/document/upload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 if (empty($document_data)) {
71
-    $document_id  = $parent_id =  0;
71
+    $document_id = $parent_id = 0;
72 72
     $path = '/';
73 73
 } else {
74 74
     $document_id = $document_data['id'];
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
 
202 202
 // Link back to the documents overview
203 203
 if ($is_certificate_mode) {
204
-    $actions = '<a href="document.php?id='.$document_id.'&selectcat=' . $selectcat.'&'.api_get_cidreq().'">'.
205
-        Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
204
+    $actions = '<a href="document.php?id='.$document_id.'&selectcat='.$selectcat.'&'.api_get_cidreq().'">'.
205
+        Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>';
206 206
 } else {
207 207
     $actions = '<a href="document.php?id='.$document_id.'&'.api_get_cidreq().'">'.
208
-        Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
208
+        Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
209 209
 }
210 210
 
211 211
 // Link to create a folder
Please login to merge, or discard this patch.
main/inc/lib/course_category.lib.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param string $canHaveCourses
104 104
      * @param int $parent_id
105 105
      *
106
-     * @return bool
106
+     * @return false|string
107 107
      */
108 108
     public static function addNode($code, $name, $canHaveCourses, $parent_id)
109 109
     {
@@ -297,8 +297,7 @@  discard block
 block discarded – undo
297 297
     /**
298 298
      * Counts the number of children categories a category has
299 299
      * @param int $categoryId The ID of the category of which we want to count the children
300
-     * @param int $count The number of subcategories we counted this far
301
-     * @return mixed The number of subcategories this category has
300
+     * @return integer The number of subcategories this category has
302 301
      */
303 302
     public static function courseCategoryChildrenCount($categoryId)
304 303
     {
@@ -476,7 +475,7 @@  discard block
 block discarded – undo
476 475
     /**
477 476
      * @param int $id
478 477
      *
479
-     * @return bool
478
+     * @return boolean|null
480 479
      */
481 480
     public static function addToUrl($id)
482 481
     {
@@ -958,7 +957,7 @@  discard block
 block discarded – undo
958 957
      * Get Pagination HTML div
959 958
      * @param $pageCurrent
960 959
      * @param $pageLength
961
-     * @param $pageTotal
960
+     * @param integer $pageTotal
962 961
      * @return string
963 962
      */
964 963
     public static function getCatalogPagination($pageCurrent, $pageLength, $pageTotal)
Please login to merge, or discard this patch.
main/admin/course_category.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     if ($action == 'delete') {
27 27
         CourseCategory::deleteNode($categoryId);
28 28
         Display::addFlash(Display::return_message(get_lang('Deleted')));
29
-        header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
29
+        header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
30 30
         exit();
31 31
     } elseif (($action == 'add' || $action == 'edit') && isset($_POST['formSent']) && $_POST['formSent']) {
32 32
         if ($action == 'add') {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
     } elseif ($action == 'moveUp') {
56 56
         CourseCategory::moveNodeUp($categoryId, $_GET['tree_pos'], $category);
57
-        header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
57
+        header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
58 58
         Display::addFlash(Display::return_message(get_lang('Updated')));
59 59
         exit();
60 60
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     $form_title = ($action == 'add') ? get_lang('AddACategory') : get_lang('EditNode');
80 80
     if (!empty($category)) {
81
-        $form_title .= ' ' . get_lang('Into') . ' ' . Security::remove_XSS($category);
81
+        $form_title .= ' '.get_lang('Into').' '.Security::remove_XSS($category);
82 82
     }
83 83
     $url = api_get_self().'?action='.Security::remove_XSS($action).'&category='.Security::remove_XSS($category).'&id='.Security::remove_XSS($categoryId);
84 84
     $form = new FormValidator('course_category', 'post', $url);
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/HTMLPurifier/Filter/AllowIframes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $vimeoMatch = preg_match('#://player.vimeo.com/#i', $matches[1]);
62 62
         $googleMapsMatch = preg_match('#src="https://maps.google.com/#i', $matches[1]);
63 63
         $slideShare = preg_match('#src="(https?:)?//www.slideshare.net/#', $matches[1]);
64
-        $platformDomain = preg_match('#src="https?://(.+\.)?' . $hostName[1] . '#i', $matches[1]);
64
+        $platformDomain = preg_match('#src="https?://(.+\.)?'.$hostName[1].'#i', $matches[1]);
65 65
 
66 66
         if ($youTubeMatch || $vimeoMatch || $googleMapsMatch || $slideShare || $platformDomain) {
67 67
             $extra = ' frameborder="0"';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             } elseif ($vimeoMatch) {
71 71
                 $extra .= ' webkitAllowFullScreen mozallowfullscreen allowFullScreen';
72 72
             }
73
-            return '<iframe ' . $matches[1] . $extra . '></iframe>';
73
+            return '<iframe '.$matches[1].$extra.'></iframe>';
74 74
         } else {
75 75
             return '';
76 76
         }
Please login to merge, or discard this patch.