@@ -7,5 +7,5 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | require_once __DIR__.'/../inc/global.inc.php'; |
10 | -header('Location:' . api_get_path(WEB_CODE_PATH) . 'ticket/tickets.php'); |
|
10 | +header('Location:'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php'); |
|
11 | 11 | exit; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $params['spacesBeforeSeparator'] = ''; |
216 | 216 | $params['spacesAfterSeparator'] = ''; |
217 | 217 | $query_vars = array_keys($_GET); |
218 | - $query_vars_needed = array ($this->param_prefix.'column', $this->param_prefix.'direction', $this->param_prefix.'per_page'); |
|
218 | + $query_vars_needed = array($this->param_prefix.'column', $this->param_prefix.'direction', $this->param_prefix.'per_page'); |
|
219 | 219 | if (count($this->additional_parameters) > 0) { |
220 | 220 | $query_vars_needed = array_merge($query_vars_needed, array_keys($this->additional_parameters)); |
221 | 221 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | |
286 | 286 | if (!$empty_table) { |
287 | 287 | if (!empty($this->additional_parameters)) { |
288 | - foreach($this->additional_parameters as $key => $value) { |
|
288 | + foreach ($this->additional_parameters as $key => $value) { |
|
289 | 289 | $html .= '<input type="hidden" name ="'.Security::remove_XSS($key).'" value ="'.Security::remove_XSS($value).'" />'; |
290 | 290 | } |
291 | 291 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $html .= '<li><a data-action ="'.$action.'" href="#" onclick="javascript:action_click(this, \''.$table_id.'\');">'.$label.'</a></li>'; |
311 | 311 | } |
312 | 312 | $html .= '</ul>'; |
313 | - $html .= '</div>';//btn-group |
|
313 | + $html .= '</div>'; //btn-group |
|
314 | 314 | $html .= '</div>'; //toolbar |
315 | 315 | } else { |
316 | 316 | $html .= $form; |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | } |
335 | 335 | } |
336 | 336 | |
337 | - return '<div class="table-responsive">' . $html . '</div>'; |
|
337 | + return '<div class="table-responsive">'.$html.'</div>'; |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | /** |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | |
389 | 389 | $html .= '<div class="clear"></div>'; |
390 | 390 | if (count($this->form_actions) > 0) { |
391 | - $script= '<script> |
|
391 | + $script = '<script> |
|
392 | 392 | /*<![CDATA[*/ |
393 | 393 | function setCheckbox(value) { |
394 | 394 | d = document.form_'.$this->table_name.'; |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | } |
411 | 411 | } |
412 | 412 | // Getting the items of the table |
413 | - $items = $this->get_clean_html(false); //no sort |
|
413 | + $items = $this->get_clean_html(false); //no sort |
|
414 | 414 | |
415 | 415 | // Generation of style classes must be improved. Maybe we need a a table name to create style on the fly: |
416 | 416 | // i.e: .whoisonline_table_grid_container instead of .grid_container |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | |
479 | 479 | $html .= '<div class="clear"></div>'; |
480 | 480 | if (count($this->form_actions) > 0) { |
481 | - $script= '<script> |
|
481 | + $script = '<script> |
|
482 | 482 | /*<![CDATA[*/ |
483 | 483 | function setCheckbox(value) { |
484 | 484 | d = document.form_'.$this->table_name.'; |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | $counter = 0; |
587 | 587 | foreach ($row as $index => $rowInfo) { |
588 | 588 | if (!isset($this->columnsToHide[$index])) { |
589 | - $newRow[$counter] = $rowInfo ; |
|
589 | + $newRow[$counter] = $rowInfo; |
|
590 | 590 | $counter++; |
591 | 591 | } |
592 | 592 | } |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | } |
602 | 602 | |
603 | 603 | if ($this->odd_even_rows_enabled == true) { |
604 | - $this->altRowAttributes(0, array ('class' => 'row_odd'), array ('class' => 'row_even'), true); |
|
604 | + $this->altRowAttributes(0, array('class' => 'row_odd'), array('class' => 'row_even'), true); |
|
605 | 605 | } |
606 | 606 | |
607 | 607 | foreach ($this->th_attributes as $column => $attributes) { |
@@ -663,11 +663,11 @@ discard block |
||
663 | 663 | } |
664 | 664 | $result[] = '<select name="'.$this->param_prefix.'per_page" onchange="javascript: this.form.submit();">'; |
665 | 665 | for ($nr = 10; $nr <= min(50, $total_number_of_items); $nr += 10) { |
666 | - $result[] = '<option value="'.$nr.'" '. ($nr == $this->per_page ? 'selected="selected"' : '').'>'.$nr.'</option>'; |
|
666 | + $result[] = '<option value="'.$nr.'" '.($nr == $this->per_page ? 'selected="selected"' : '').'>'.$nr.'</option>'; |
|
667 | 667 | } |
668 | 668 | // @todo no limits |
669 | 669 | //if ($total_number_of_items < 500) { |
670 | - $result[] = '<option value="'.$total_number_of_items.'" '. ($total_number_of_items == $this->per_page ? 'selected="selected"' : '').'>'.api_ucfirst(get_lang('All')).'</option>'; |
|
670 | + $result[] = '<option value="'.$total_number_of_items.'" '.($total_number_of_items == $this->per_page ? 'selected="selected"' : '').'>'.api_ucfirst(get_lang('All')).'</option>'; |
|
671 | 671 | //} |
672 | 672 | $result[] = '</select>'; |
673 | 673 | $result[] = '<noscript>'; |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | */ |
786 | 786 | public function get_additional_url_paramstring() |
787 | 787 | { |
788 | - $param_string_parts = array (); |
|
788 | + $param_string_parts = array(); |
|
789 | 789 | if (is_array($this->additional_parameters) && count($this->additional_parameters) > 0) { |
790 | 790 | foreach ($this->additional_parameters as $key => & $value) { |
791 | 791 | $param_string_parts[] = urlencode($key).'='.urlencode($value); |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | //$param[$tablename.'_direction'] = $_GET[$tablename.'_direction']; |
799 | 799 | $my_get_direction = $_GET[$tablename.'_direction']; |
800 | 800 | if (!in_array($my_get_direction, array('ASC', 'DESC'))) { |
801 | - $param[$tablename.'_direction'] = 'ASC'; |
|
801 | + $param[$tablename.'_direction'] = 'ASC'; |
|
802 | 802 | } else { |
803 | 803 | $param[$tablename.'_direction'] = $my_get_direction; |
804 | 804 | } |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | if (isset($_GET[$tablename.'_column'])) { |
813 | 813 | $param[$tablename.'_column'] = intval($_GET[$tablename.'_column']); |
814 | 814 | } |
815 | - $param_string_parts = array (); |
|
815 | + $param_string_parts = array(); |
|
816 | 816 | foreach ($param as $key => & $value) { |
817 | 817 | $param_string_parts[] = urlencode($key).'='.urlencode($value); |
818 | 818 | } |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | $param[$this->param_prefix.'page_nr'] = $this->page_nr; |
834 | 834 | $param[$this->param_prefix.'per_page'] = $this->per_page; |
835 | 835 | $param[$this->param_prefix.'column'] = $this->column; |
836 | - $param_string_parts = array (); |
|
836 | + $param_string_parts = array(); |
|
837 | 837 | foreach ($param as $key => & $value) { |
838 | 838 | $param_string_parts[] = urlencode($key).'='.urlencode($value); |
839 | 839 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $tool_name = get_lang('ConfigureInscription'); |
47 | 47 | if (!empty($action)) { |
48 | 48 | $interbreadcrumb[] = array('url' => 'configure_inscription.php', 'name' => get_lang('ConfigureInscription')); |
49 | - switch($action) { |
|
49 | + switch ($action) { |
|
50 | 50 | case 'edit_top': |
51 | 51 | $tool_name = get_lang('EditTopRegister'); |
52 | 52 | break; |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | // This request is only the preparation for the update of the home_top |
142 | 142 | $home_top = ''; |
143 | 143 | if (is_file($homep.$topf.'_'.$lang.$ext) && is_readable($homep.$topf.'_'.$lang.$ext)) { |
144 | - $home_top = @(string)file_get_contents($homep.$topf.'_'.$lang.$ext); |
|
144 | + $home_top = @(string) file_get_contents($homep.$topf.'_'.$lang.$ext); |
|
145 | 145 | } elseif (is_file($homep.$topf.$lang.$ext) && is_readable($homep.$topf.$lang.$ext)) { |
146 | - $home_top = @(string)file_get_contents($homep.$topf.$lang.$ext); |
|
146 | + $home_top = @(string) file_get_contents($homep.$topf.$lang.$ext); |
|
147 | 147 | } else { |
148 | 148 | $errorMsg = get_lang('HomePageFilesNotReadable'); |
149 | 149 | } |
@@ -184,15 +184,15 @@ discard block |
||
184 | 184 | if (api_is_western_name_order()) { |
185 | 185 | // FIRST NAME and LAST NAME |
186 | 186 | $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40, 'disabled' => 'disabled')); |
187 | - $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40, 'disabled' => 'disabled')); |
|
187 | + $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40, 'disabled' => 'disabled')); |
|
188 | 188 | } else { |
189 | 189 | // LAST NAME and FIRST NAME |
190 | - $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40, 'disabled' => 'disabled')); |
|
190 | + $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40, 'disabled' => 'disabled')); |
|
191 | 191 | $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40, 'disabled' => 'disabled')); |
192 | 192 | } |
193 | 193 | $form->applyFilter('firstname', 'trim'); |
194 | 194 | $form->applyFilter('lastname', 'trim'); |
195 | - $form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required'); |
|
195 | + $form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required'); |
|
196 | 196 | $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required'); |
197 | 197 | |
198 | 198 | |
@@ -210,10 +210,10 @@ discard block |
||
210 | 210 | $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required'); |
211 | 211 | $form->addRule('username', get_lang('UsernameWrong'), 'username'); |
212 | 212 | $form->addRule('username', get_lang('UserTaken'), 'username_available'); |
213 | - $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
213 | + $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
214 | 214 | |
215 | 215 | // PASSWORD |
216 | - $form->addElement('password', 'pass1', get_lang('Pass'), array('size' => 40, 'disabled' => 'disabled')); |
|
216 | + $form->addElement('password', 'pass1', get_lang('Pass'), array('size' => 40, 'disabled' => 'disabled')); |
|
217 | 217 | $form->addElement('password', 'pass2', get_lang('Confirmation'), array('size' => 40, 'disabled' => 'disabled')); |
218 | 218 | $form->addRule('pass1', get_lang('ThisFieldIsRequired'), 'required'); |
219 | 219 | $form->addRule('pass2', get_lang('ThisFieldIsRequired'), 'required'); |
@@ -241,25 +241,25 @@ discard block |
||
241 | 241 | |
242 | 242 | // EXTENDED FIELDS |
243 | 243 | if (api_get_setting('extended_profile') == 'true' && |
244 | - api_get_setting('extendedprofile_registration','mycomptetences') == 'true' |
|
244 | + api_get_setting('extendedprofile_registration', 'mycomptetences') == 'true' |
|
245 | 245 | ) { |
246 | 246 | $form->addHtmlEditor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130')); |
247 | 247 | } |
248 | 248 | |
249 | 249 | if (api_get_setting('extended_profile') == 'true' && |
250 | - api_get_setting('extendedprofile_registration','mydiplomas') == 'true' |
|
250 | + api_get_setting('extendedprofile_registration', 'mydiplomas') == 'true' |
|
251 | 251 | ) { |
252 | 252 | $form->addHtmlEditor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130')); |
253 | 253 | } |
254 | 254 | |
255 | 255 | if (api_get_setting('extended_profile') == 'true' && |
256 | - api_get_setting('extendedprofile_registration','myteach') == 'true' |
|
256 | + api_get_setting('extendedprofile_registration', 'myteach') == 'true' |
|
257 | 257 | ) { |
258 | 258 | $form->addHtmlEditor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130')); |
259 | 259 | } |
260 | 260 | |
261 | 261 | if (api_get_setting('extended_profile') == 'true' && |
262 | - api_get_setting('extendedprofile_registration','mypersonalopenarea') == 'true' |
|
262 | + api_get_setting('extendedprofile_registration', 'mypersonalopenarea') == 'true' |
|
263 | 263 | ) { |
264 | 264 | $form->addHtmlEditor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130')); |
265 | 265 | } |
@@ -349,14 +349,14 @@ discard block |
||
349 | 349 | |
350 | 350 | $form->setDefaults($defaults); |
351 | 351 | |
352 | -switch ($action){ |
|
352 | +switch ($action) { |
|
353 | 353 | case 'edit_top': |
354 | 354 | if ($action == 'edit_top') { |
355 | 355 | $name = $topf; |
356 | 356 | $open = $home_top; |
357 | 357 | } else { |
358 | 358 | $name = $newsf; |
359 | - $open = @(string)file_get_contents($homep.$newsf.'_'.$lang.$ext); |
|
359 | + $open = @(string) file_get_contents($homep.$newsf.'_'.$lang.$ext); |
|
360 | 360 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
361 | 361 | } |
362 | 362 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | |
367 | 367 | $default = array(); |
368 | 368 | $form = new FormValidator('configure_inscription_'.$action, 'post', api_get_self().'?action='.$action, '', array('style' => 'margin: 0px;')); |
369 | - $renderer =& $form->defaultRenderer(); |
|
369 | + $renderer = & $form->defaultRenderer(); |
|
370 | 370 | $renderer->setHeaderTemplate(''); |
371 | 371 | $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>'); |
372 | 372 | $renderer->setCustomElementTemplate('<tr><td>{element}</td></tr>'); |
@@ -385,9 +385,9 @@ discard block |
||
385 | 385 | |
386 | 386 | $open = ''; |
387 | 387 | if (file_exists($homep.$topf.'_'.$lang.$ext)) { |
388 | - $open = @(string)file_get_contents($homep.$topf.'_'.$lang.$ext); |
|
388 | + $open = @(string) file_get_contents($homep.$topf.'_'.$lang.$ext); |
|
389 | 389 | } else { |
390 | - $open = @(string)file_get_contents($homep.$topf.$ext); |
|
390 | + $open = @(string) file_get_contents($homep.$topf.$ext); |
|
391 | 391 | } |
392 | 392 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
393 | 393 | if (!empty($open)) { |
@@ -602,7 +602,7 @@ |
||
602 | 602 | $table_doc = Database:: get_course_table(TABLE_DOCUMENT); |
603 | 603 | |
604 | 604 | if (!empty($courseId) && !empty($session_id)) { |
605 | - $session_id = intval($session_id); |
|
605 | + $session_id = intval($session_id); |
|
606 | 606 | if ($with_base_content) { |
607 | 607 | $session_condition = api_get_session_condition( |
608 | 608 | $session_id, |
@@ -22,9 +22,9 @@ |
||
22 | 22 | * @param string $description |
23 | 23 | * @param int $display_order |
24 | 24 | */ |
25 | - public function __construct($id,$name,$description,$display_order) |
|
25 | + public function __construct($id, $name, $description, $display_order) |
|
26 | 26 | { |
27 | - parent::__construct($id,RESOURCE_GLOSSARY); |
|
27 | + parent::__construct($id, RESOURCE_GLOSSARY); |
|
28 | 28 | $this->glossary_id = $id; |
29 | 29 | $this->name = $name; |
30 | 30 | $this->description = $description; |
@@ -25,6 +25,6 @@ |
||
25 | 25 | public function show() |
26 | 26 | { |
27 | 27 | parent::show(); |
28 | - echo $this->obj->title . ' (' . $this->obj->poster_name . ', ' . $this->obj->post_date . ')'; |
|
28 | + echo $this->obj->title.' ('.$this->obj->poster_name.', '.$this->obj->post_date.')'; |
|
29 | 29 | } |
30 | 30 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @param int $id |
19 | 19 | * @param string $title |
20 | 20 | */ |
21 | - public function __construct($id,$title) |
|
21 | + public function __construct($id, $title) |
|
22 | 22 | { |
23 | 23 | parent::__construct($id, RESOURCE_SESSION_COURSE); |
24 | 24 | $this->title = $title; |
@@ -153,18 +153,18 @@ |
||
153 | 153 | $this->js_lib = $js_lib; |
154 | 154 | $this->content_license = $content_license; |
155 | 155 | $this->debug = $debug; |
156 | - $this->visibility=$visibility; |
|
156 | + $this->visibility = $visibility; |
|
157 | 157 | |
158 | - $this->use_max_score=$use_max_score; |
|
159 | - $this->autolaunch=$autolaunch; |
|
160 | - $this->created_on=$created_on; |
|
161 | - $this->modified_on=$modified_on; |
|
162 | - $this->publicated_on=$publicated_on; |
|
163 | - $this->expired_on=$expired_on; |
|
164 | - $this->session_id=$session_id; |
|
158 | + $this->use_max_score = $use_max_score; |
|
159 | + $this->autolaunch = $autolaunch; |
|
160 | + $this->created_on = $created_on; |
|
161 | + $this->modified_on = $modified_on; |
|
162 | + $this->publicated_on = $publicated_on; |
|
163 | + $this->expired_on = $expired_on; |
|
164 | + $this->session_id = $session_id; |
|
165 | 165 | |
166 | - $this->author= $author; |
|
167 | - $this->preview_image= $preview_image; |
|
166 | + $this->author = $author; |
|
167 | + $this->preview_image = $preview_image; |
|
168 | 168 | |
169 | 169 | $this->items = $items; |
170 | 170 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $category_id, |
47 | 47 | $on_homepage |
48 | 48 | ) { |
49 | - parent::__construct($id,RESOURCE_LINK); |
|
49 | + parent::__construct($id, RESOURCE_LINK); |
|
50 | 50 | $this->title = $title; |
51 | 51 | $this->url = $url; |
52 | 52 | $this->description = $description; |