Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
main/mySpace/company_reports.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     api_not_allowed(true);
17 17
 }
18 18
 
19
-$interbreadcrumb[] = array ('url' => api_is_student_boss()?'#':'index.php', 'name' => get_lang('MySpace'));
19
+$interbreadcrumb[] = array('url' => api_is_student_boss() ? '#' : 'index.php', 'name' => get_lang('MySpace'));
20 20
 $tool_name = get_lang('Report');
21 21
 
22 22
 $this_section = SECTION_TRACKING;
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
 //Column config
44 44
 $column_model = array(
45
-    array('name'=>'course',         'index'=>'title',       'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'),
46
-    array('name'=>'user',           'index'=>'user',        'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'),
47
-    array('name'=>'email',          'index'=>'email',       'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'),
48
-    array('name'=>'time',           'index'=>'time',        'width'=>'50',  'align'=>'left','sortable'=>'false'),
49
-    array('name'=>'certificate',    'index'=>'certificate', 'width'=>'50',  'align'=>'left','sortable'=>'false'),
50
-    array('name'=>'progress_100',   'index'=>'progress_100',       'width'=>'50',  'align'=>'left','sortable'=>'false'),
51
-    array('name'=>'progress',       'index'=>'progress',    'width'=>'50',  'align'=>'left','sortable'=>'false')
45
+    array('name'=>'course', 'index'=>'title', 'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'),
46
+    array('name'=>'user', 'index'=>'user', 'width'=>'100', 'align'=>'left', 'sortable'=>'false', 'wrap_cell' => 'true'),
47
+    array('name'=>'email', 'index'=>'email', 'width'=>'100', 'align'=>'left', 'sortable'=>'false', 'wrap_cell' => 'true'),
48
+    array('name'=>'time', 'index'=>'time', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
49
+    array('name'=>'certificate', 'index'=>'certificate', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
50
+    array('name'=>'progress_100', 'index'=>'progress_100', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
51
+    array('name'=>'progress', 'index'=>'progress', 'width'=>'50', 'align'=>'left', 'sortable'=>'false')
52 52
 );
53 53
 
54 54
 if (!empty($extra_fields)) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 }
68 68
 
69 69
 if (api_is_student_boss()) {
70
-    $column_model[] = array('name'=>'group', 'index'=>'group', 'width'=>'50', 'align'=>'left','sortable'=>'false');
70
+    $column_model[] = array('name'=>'group', 'index'=>'group', 'width'=>'50', 'align'=>'left', 'sortable'=>'false');
71 71
     $columns[] = get_lang('Group');
72 72
 }
73 73
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 $htmlHeadXtra[] = '<script>
80 80
 $(function() {
81
-    '.Display::grid_js('user_course_report',  $url, $columns, $column_model, $extra_params, array(), null, true).'
81
+    '.Display::grid_js('user_course_report', $url, $columns, $column_model, $extra_params, array(), null, true).'
82 82
     jQuery("#user_course_report").jqGrid("navGrid","#user_course_report_pager",{
83 83
         view:false,
84 84
         edit:false,
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 if (api_is_student_boss()) {
103 103
     $actions .= Display::url(
104 104
         Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
105
-        api_get_path(WEB_CODE_PATH) . "auth/my_progress.php"
105
+        api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
106 106
     );
107 107
     $actions .= Display::url(
108 108
         Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM),
109
-        api_get_path(WEB_CODE_PATH) . "mySpace/student.php"
109
+        api_get_path(WEB_CODE_PATH)."mySpace/student.php"
110 110
     );
111 111
     $actions .= Display::url(
112 112
         Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             [],
120 120
             ICON_SIZE_MEDIUM
121 121
         ),
122
-        api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
122
+        api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
123 123
     );
124 124
 }
125 125
 
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
 }
131 131
 $content .= Display::url(
132 132
     get_lang("CompanyReportResumed"),
133
-    api_get_path(WEB_CODE_PATH) . "mySpace/company_reports_resumed.php",
133
+    api_get_path(WEB_CODE_PATH)."mySpace/company_reports_resumed.php",
134 134
     array(
135 135
         'class' => 'btn btn-success'
136 136
     )
137 137
 );
138 138
 $content .= '</div>';
139
-$content .= '<h1 class="page-header">' . get_lang('CompanyReport') . '</h1>';
139
+$content .= '<h1 class="page-header">'.get_lang('CompanyReport').'</h1>';
140 140
 $content .= Display::grid_html('user_course_report');
141 141
 
142 142
 $tpl = new Template($tool_name);
Please login to merge, or discard this patch.
main/mySpace/company_reports_resumed.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     api_not_allowed(true);
16 16
 }
17 17
 
18
-$interbreadcrumb[] = array('url' => api_is_student_boss()?'#':'index.php', 'name' => get_lang('MySpace'));
18
+$interbreadcrumb[] = array('url' => api_is_student_boss() ? '#' : 'index.php', 'name' => get_lang('MySpace'));
19 19
 
20 20
 $tool_name = get_lang('Report');
21 21
 $this_section = SECTION_TRACKING;
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
 if (api_is_student_boss()) {
90 90
     $actions .= Display::url(
91 91
         Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
92
-        api_get_path(WEB_CODE_PATH) . "auth/my_progress.php"
92
+        api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
93 93
     );
94 94
     $actions .= Display::url(
95 95
         Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM),
96
-        api_get_path(WEB_CODE_PATH) . "mySpace/student.php"
96
+        api_get_path(WEB_CODE_PATH)."mySpace/student.php"
97 97
     );
98 98
     $actions .= Display::url(
99 99
         Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
100
-        api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php"
100
+        api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
101 101
     );
102 102
     $actions .= Display::url(
103 103
         Display::return_icon(
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             [],
107 107
             ICON_SIZE_MEDIUM
108 108
         ),
109
-        api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
109
+        api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
110 110
     );
111 111
 }
112 112
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 if (!api_is_student_boss()) {
120 120
     $content .= Display::url(
121 121
         get_lang("CompanyReport"),
122
-        api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php",
122
+        api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php",
123 123
         array(
124 124
             'class' => 'btn btn-success'
125 125
         )
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 }
128 128
 
129 129
 $content .= '</div>';
130
-$content .= '<h1 class="page-header">' . get_lang('CompanyReportResumed') . '</h1>';
130
+$content .= '<h1 class="page-header">'.get_lang('CompanyReportResumed').'</h1>';
131 131
 $content .= Display::grid_html('user_course_report');
132 132
 
133 133
 $tpl = new Template($tool_name);
Please login to merge, or discard this patch.
src/Chamilo/ContactBundle/Controller/ContactController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      * @Route("/contact")
20 20
      *
21 21
      * @param Request $request
22
-     * @return mixed
22
+     * @return Response
23 23
      */
24 24
     public function indexAction(Request $request)
25 25
     {
Please login to merge, or discard this patch.
main/document/download_scorm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 $doc_url = str_replace(' ', '+', $doc_url);
40 40
 $doc_url = str_replace(array('../', '\\..', '\\0', '..\\'), array('', '', '', ''), $doc_url); //echo $doc_url;
41 41
 
42
-if (strpos($doc_url,'../') || strpos($doc_url,'/..')) {
42
+if (strpos($doc_url, '../') || strpos($doc_url, '/..')) {
43 43
     $doc_url = '';
44 44
 }
45 45
 
Please login to merge, or discard this patch.
plugin/vchamilo/views/editinstance_form.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 
14 14
     /**
15 15
      * ChamiloForm constructor.
16
-     * @param $mode
17
-     * @param $returnurl
18
-     * @param $cancelurl
16
+     * @param string $mode
17
+     * @param string $returnurl
18
+     * @param string $cancelurl
19 19
      * @param $customdata
20 20
      */
21 21
     public function __construct($mode, $returnurl, $cancelurl, $customdata = [])
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      * Check that form data is valid.
138 138
      * You should almost always use this, rather than {@see validate_defined_fields}
139 139
      *
140
-     * @return bool true if form data valid
140
+     * @return boolean|null true if form data valid
141 141
      */
142 142
     public function is_validated()
143 143
     {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      *                is NOT to validate the form when a no submit button has been pressed.
167 167
      *                pass true here to override this behaviour
168 168
      *
169
-     * @return bool true if form data valid
169
+     * @return boolean|null true if form data valid
170 170
      */
171 171
     public function validate_defined_fields($validateonnosubmit=false)
172 172
     {
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         return $this->_form->display();
45 45
     }
46 46
 
47
-    public function definition_after_data(){
47
+    public function definition_after_data() {
48 48
     }
49 49
 
50 50
     public function return_form()
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
      * @param bool $slashed true means return data with addslashes applied
65 65
      * @return object submitted data; NULL if not valid or not submitted
66 66
      */
67
-    public function get_data($slashed=true)
67
+    public function get_data($slashed = true)
68 68
     {
69
-        $cform =& $this->_form;
69
+        $cform = & $this->_form;
70 70
 
71 71
         if ($this->is_submitted() and $this->is_validated()) {
72 72
             $data = $cform->exportValues(null, $slashed);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             if (empty($data)) {
75 75
                 return null;
76 76
             } else {
77
-                return (object)$data;
77
+                return (object) $data;
78 78
             }
79 79
         } else {
80 80
             return null;
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
      * @param bool $slashed true means return data with addslashes applied
88 88
      * @return object submitted data; NULL if not submitted
89 89
      */
90
-    public function get_submitted_data($slashed=true)
90
+    public function get_submitted_data($slashed = true)
91 91
     {
92
-        $cform =& $this->_form;
92
+        $cform = & $this->_form;
93 93
 
94 94
         if ($this->is_submitted()) {
95 95
             $data = $cform->exportValues(null, $slashed);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             if (empty($data)) {
98 98
                 return null;
99 99
             } else {
100
-                return (object)$data;
100
+                return (object) $data;
101 101
             }
102 102
         } else {
103 103
             return null;
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function is_cancelled()
123 123
     {
124
-        $cform =& $this->_form;
125
-        if ($cform->isSubmitted()){
126
-            foreach ($cform->_cancelButtons as $cancelbutton){
127
-                if (optional_param($cancelbutton, 0, PARAM_RAW)){
124
+        $cform = & $this->_form;
125
+        if ($cform->isSubmitted()) {
126
+            foreach ($cform->_cancelButtons as $cancelbutton) {
127
+                if (optional_param($cancelbutton, 0, PARAM_RAW)) {
128 128
                     return true;
129 129
                 }
130 130
             }
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
      *
169 169
      * @return bool true if form data valid
170 170
      */
171
-    public function validate_defined_fields($validateonnosubmit=false)
171
+    public function validate_defined_fields($validateonnosubmit = false)
172 172
     {
173 173
         static $validated = null; // one validation is enough
174
-        $cform =& $this->_form;
174
+        $cform = & $this->_form;
175 175
 
176
-        if ($this->no_submit_button_pressed() && empty($validateonnosubmit)){
176
+        if ($this->no_submit_button_pressed() && empty($validateonnosubmit)) {
177 177
             return false;
178 178
         } elseif ($validated === null) {
179 179
             $internal_val = $cform->validate();
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
             $data = $cform->exportValues(null, true);
193 193
             $chamilo_val = $this->validation($data, $files);
194
-            if ((is_array($chamilo_val) && count($chamilo_val)!==0)) {
194
+            if ((is_array($chamilo_val) && count($chamilo_val) !== 0)) {
195 195
                 // non-empty array means errors
196 196
                 foreach ($chamilo_val as $element => $msg) {
197 197
                     $cform->setElementError($element, $msg);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             return $nosubmit;
218 218
         }
219 219
 
220
-        $cform =& $this->_form;
220
+        $cform = & $this->_form;
221 221
         $nosubmit = false;
222 222
         if (!$this->is_submitted()) {
223 223
             return false;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     public function set_data($default_values, $slashed = false)
247 247
     {
248 248
         if (is_object($default_values)) {
249
-            $default_values = (array)$default_values;
249
+            $default_values = (array) $default_values;
250 250
         }
251 251
         $filter = $slashed ? 'stripslashes' : NULL;
252 252
         $this->_form->setDefaults($default_values, $filter);
@@ -266,14 +266,14 @@  discard block
 block discarded – undo
266 266
         }
267 267
 
268 268
         $errors = array();
269
-        $mform =& $this->_form;
269
+        $mform = & $this->_form;
270 270
 
271 271
         // check the files
272 272
         $status = $this->_upload_manager->preprocess_files();
273 273
 
274 274
         // now check that we really want each file
275 275
         foreach ($_FILES as $elname=>$file) {
276
-            if ($mform->elementExists($elname) and $mform->getElementType($elname)=='file') {
276
+            if ($mform->elementExists($elname) and $mform->getElementType($elname) == 'file') {
277 277
                 $required = $mform->isElementRequired($elname);
278 278
                 if (!empty($this->_upload_manager->files[$elname]['uploadlog']) &&
279 279
                     empty($this->_upload_manager->files[$elname]['clear'])
Please login to merge, or discard this patch.
plugin/vchamilo/vcron.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
 global $VCRON;
32 32
 
33 33
 $VCRON = new StdClass;
34
-$VCRON->ACTIVATION = 'cli';                         // choose how individual cron are launched, 'cli' or 'web'
35
-$VCRON->STRATEGY = ROUND_ROBIN ;                    // choose vcron rotation mode
36
-$VCRON->PERIOD = 15 * MINSECS ;                     // used if LOWEST_POSSIBLE_GAP to setup the max gap
37
-$VCRON->TIMEOUT = 300;                              // time out for CURL call to effective cron
34
+$VCRON->ACTIVATION = 'cli'; // choose how individual cron are launched, 'cli' or 'web'
35
+$VCRON->STRATEGY = ROUND_ROBIN; // choose vcron rotation mode
36
+$VCRON->PERIOD = 15 * MINSECS; // used if LOWEST_POSSIBLE_GAP to setup the max gap
37
+$VCRON->TIMEOUT = 300; // time out for CURL call to effective cron
38 38
 // $VCRON->TRACE = $_configuration['root_sys'].'plugin/vchamilo/log/vcrontrace.log';   // Trace file where to collect cron outputs
39
-$VCRON->TRACE = '/data/log/chamilo/vcrontrace.log';   // Trace file where to collect cron outputs
40
-$VCRON->TRACE_ENABLE = true;                        // enables tracing
39
+$VCRON->TRACE = '/data/log/chamilo/vcrontrace.log'; // Trace file where to collect cron outputs
40
+$VCRON->TRACE_ENABLE = true; // enables tracing
41 41
 
42 42
 if (!is_dir($_configuration['root_sys'].'plugin/vchamilo/log')) {
43 43
     mkdir($_configuration['root_sys'].'plugin/vchamilo/log', 0777, true);
@@ -98,32 +98,32 @@  discard block
 block discarded – undo
98 98
     $timestamp_receive = time();
99 99
 
100 100
     if ($rawresponse === false) {
101
-        $error = curl_errno($ch) .':'. curl_error($ch);
102
-        if ($VCRON->TRACE_ENABLE){
103
-            if ($CRONTRACE){
104
-                fputs($CRONTRACE, "VCron start on $vhost->root_web : ".api_time_to_hms($timestamp_send)."\n" );
101
+        $error = curl_errno($ch).':'.curl_error($ch);
102
+        if ($VCRON->TRACE_ENABLE) {
103
+            if ($CRONTRACE) {
104
+                fputs($CRONTRACE, "VCron start on $vhost->root_web : ".api_time_to_hms($timestamp_send)."\n");
105 105
                 fputs($CRONTRACE, "VCron Error : $error \n");
106
-                fputs($CRONTRACE, "VCron stop on $vhost->root_web : $timestamp_receive\n#################\n\n" );
106
+                fputs($CRONTRACE, "VCron stop on $vhost->root_web : $timestamp_receive\n#################\n\n");
107 107
                 fclose($CRONTRACE);
108 108
             }
109 109
         }
110
-        echo("VCron started on $vhost->root_web : ".api_time_to_hms($timestamp_send)."\n" );
110
+        echo("VCron started on $vhost->root_web : ".api_time_to_hms($timestamp_send)."\n");
111 111
         echo("VCron Error : $error \n");
112
-        echo("VCron stop on $vhost->root_web : ".api_time_to_hms($timestamp_receive)."\n#################\n\n" );
112
+        echo("VCron stop on $vhost->root_web : ".api_time_to_hms($timestamp_receive)."\n#################\n\n");
113 113
         return false;
114 114
     }
115 115
 
116 116
     if ($VCRON->TRACE_ENABLE) {
117 117
         if ($CRONTRACE) {
118
-            fputs($CRONTRACE, "VCron start on $vhost->vhostname : ".api_time_to_hms($timestamp_send)."\n" );
118
+            fputs($CRONTRACE, "VCron start on $vhost->vhostname : ".api_time_to_hms($timestamp_send)."\n");
119 119
             fputs($CRONTRACE, $rawresponse."\n");
120
-            fputs($CRONTRACE, "VCron stop on $vhost->vhostname : ".api_time_to_hms($timestamp_receive)."\n#################\n\n" );
120
+            fputs($CRONTRACE, "VCron stop on $vhost->vhostname : ".api_time_to_hms($timestamp_receive)."\n#################\n\n");
121 121
             fclose($CRONTRACE);
122 122
         }
123 123
     }
124
-    echo("VCron start on $vhost->root_web : ".api_time_to_hms($timestamp_send)."\n" );
124
+    echo("VCron start on $vhost->root_web : ".api_time_to_hms($timestamp_send)."\n");
125 125
     echo($rawresponse."\n");
126
-    echo("VCron stop on $vhost->root_web : ".api_time_to_hms($timestamp_receive)."\n#################\n\n" );
126
+    echo("VCron stop on $vhost->root_web : ".api_time_to_hms($timestamp_receive)."\n#################\n\n");
127 127
     $vhost->lastcrongap = time() - $vhost->lastcron;
128 128
     $vhost->lastcron = $timestamp_send;
129 129
     $vhost->croncount++;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     $vhostid = $vhost->id;
132 132
     unset($vhost->id);
133 133
 
134
-    Database::update('vchamilo', (array)$vhost, array('id = ?' => $vhostid));
134
+    Database::update('vchamilo', (array) $vhost, array('id = ?' => $vhostid));
135 135
 
136 136
 }
137 137
 
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 
156 156
     if ($VCRON->TRACE_ENABLE) {
157 157
         if ($CRONTRACE) {
158
-            fputs($CRONTRACE, "VCron start on $vhost->root_web : $timestamp_send\n" );
158
+            fputs($CRONTRACE, "VCron start on $vhost->root_web : $timestamp_send\n");
159 159
             fputs($CRONTRACE, $rawresponse."\n");
160
-            fputs($CRONTRACE, "VCron stop on $vhost->root_web : $timestamp_receive\n#################\n\n" );
160
+            fputs($CRONTRACE, "VCron stop on $vhost->root_web : $timestamp_receive\n#################\n\n");
161 161
             fclose($CRONTRACE);
162 162
         }
163 163
     }
@@ -210,14 +210,14 @@  discard block
 block discarded – undo
210 210
         $match = trim($match);
211 211
 
212 212
         // try for IP match (Left side)
213
-        $lhs = substr($host,0,strlen($match));
214
-        if (strcasecmp($match,$lhs)==0) {
213
+        $lhs = substr($host, 0, strlen($match));
214
+        if (strcasecmp($match, $lhs) == 0) {
215 215
             return true;
216 216
         }
217 217
 
218 218
         // try for host match (Right side)
219
-        $rhs = substr($host,-strlen($match));
220
-        if (strcasecmp($match,$rhs)==0) {
219
+        $rhs = substr($host, -strlen($match));
220
+        if (strcasecmp($match, $rhs) == 0) {
221 221
             return true;
222 222
         }
223 223
     }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 // Main execution sequence
230 230
 
231
-if (!$vchamilos = Database::select('*', 'vchamilo', array(), 'all')){
231
+if (!$vchamilos = Database::select('*', 'vchamilo', array(), 'all')) {
232 232
     die("Nothing to do. No Vhosts");
233 233
 }
234 234
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 if ($VCRON->STRATEGY == ROUND_ROBIN) {
242 242
     $rr = 0;
243 243
     foreach ($allvhosts as $vhostassoc) {
244
-        $vhost = (object)$vhostassoc;
244
+        $vhost = (object) $vhostassoc;
245 245
         if ($rr == 1) {
246 246
             api_set_setting('vchamilo_cron_lasthost', $vhost->id);
247 247
             echo("Round Robin : ".$vhost->root_web."\n");
@@ -253,13 +253,13 @@  discard block
 block discarded – undo
253 253
 
254 254
             die('Done.');
255 255
         }
256
-        if ($vhost->id == api_get_setting('vchamilo_cron_lasthost', 'vchamilo')){
256
+        if ($vhost->id == api_get_setting('vchamilo_cron_lasthost', 'vchamilo')) {
257 257
             $rr = 1; // take next one
258 258
         }
259 259
     }
260 260
 
261 261
     // We were at last. Loop back and take first.
262
-    $firsthost = (object)$allvhosts[0];
262
+    $firsthost = (object) $allvhosts[0];
263 263
     api_set_setting('vchamilo_cron_lasthost', $firsthost->id, 'vchamilo');
264 264
     echo("Round Robin : ".$firsthost->root_web."\n");
265 265
     if ($VCRON->ACTIVATION == 'cli') {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     $hostsperturn = max(1, $VCRON->PERIOD / api_get_setting('vcrontickperiod', 'vchamilo') * count($allvhosts));
279 279
     $i = 0;
280 280
     foreach ($allvhosts as $vhostassoc) {
281
-        $vhost = (object)$vhostassoc;
281
+        $vhost = (object) $vhostassoc;
282 282
         if ((time() - $vhost->lastcron) > $VCRON->PERIOD) {
283 283
             if ($VCRON->ACTIVATION == 'cli') {
284 284
                 exec_vhost_cron($vhost);
Please login to merge, or discard this patch.
main/inc/global.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     if (!$alreadyInstalled) {
48 48
         $global_error_code = 2;
49 49
         // The system has not been installed yet.
50
-        require_once __DIR__ . '/../inc/global_error_message.inc.php';
50
+        require_once __DIR__.'/../inc/global_error_message.inc.php';
51 51
         die();
52 52
     }
53 53
 }
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
     $request_url_root = '';
159 159
     if (empty($_SERVER['HTTP_HOST'])) {
160 160
         if (empty($_SERVER['SERVER_NAME'])) {
161
-            $request_url_root = $protocol . 'localhost/';
161
+            $request_url_root = $protocol.'localhost/';
162 162
         } else {
163
-            $request_url_root = $protocol . $_SERVER['SERVER_NAME'] . '/';
163
+            $request_url_root = $protocol.$_SERVER['SERVER_NAME'].'/';
164 164
         }
165 165
     } else {
166 166
         $request_url_root = $protocol.$_SERVER['HTTP_HOST'].'/';
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     }
455 455
 
456 456
     if (!empty($language_priority1) && api_get_language_from_type($language_priority1) !== false) {
457
-        $language_interface =  api_get_language_from_type($language_priority1);
457
+        $language_interface = api_get_language_from_type($language_priority1);
458 458
     } else {
459 459
         if (isset($_course['language'])) {
460 460
             $language_interface = $_course['language'];
Please login to merge, or discard this patch.
main/inc/ajax/record_audio_rtc.ajax.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,16 +25,16 @@
 block discarded – undo
25 25
 $audioFileName = Database::escape_string($audioFileName);
26 26
 $audioFileName = api_replace_dangerous_char($audioFileName);
27 27
 $audioFileName = disable_dangerous_file($audioFileName);
28
-$audioDir  = Security::remove_XSS($audioDir);
28
+$audioDir = Security::remove_XSS($audioDir);
29 29
 
30
-$dirBaseDocuments = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
31
-$saveDir = $dirBaseDocuments . $audioDir;
30
+$dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document';
31
+$saveDir = $dirBaseDocuments.$audioDir;
32 32
 
33 33
 if (!is_dir($saveDir)) {
34 34
     DocumentManager::createDefaultAudioFolder($courseInfo);
35 35
 }
36 36
 
37
-$documentPath = $saveDir . '/' . $audioFileName;
37
+$documentPath = $saveDir.'/'.$audioFileName;
38 38
 
39 39
 $file['file'] = $file;
40 40
 
Please login to merge, or discard this patch.
main/inc/ajax/record_audio_wami.ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 // Do not use here check Fileinfo method because return: text/plain
49 49
 
50 50
 $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
51
-$saveDir = $dirBaseDocuments . $wamidir;
51
+$saveDir = $dirBaseDocuments.$wamidir;
52 52
 
53 53
 if (!is_dir($saveDir)) {
54 54
     DocumentManager::createDefaultAudioFolder($_course);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 ob_start();
89 89
 
90 90
 // Strangely the file path changes with a double extension
91
-copy($documentPath, $documentPath . '.wav');
91
+copy($documentPath, $documentPath.'.wav');
92 92
 
93 93
 $documentData = DocumentManager::upload_document(
94 94
     $file,
Please login to merge, or discard this patch.