@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | $htmlHeadXtra[] = ' |
22 | 22 | <script language="javascript"> |
23 | 23 | $(document).ready(function(){ |
24 | - $( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'yy-mm-dd'" . ' }); |
|
25 | - $( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'yy-mm-dd'" . ' }); |
|
24 | + $( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'yy-mm-dd'".' }); |
|
25 | + $( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'yy-mm-dd'".' }); |
|
26 | 26 | }); |
27 | 27 | function validate(){ |
28 | 28 | if( $("#keyword_start_date_start").val() != "" && $("#keyword_start_date_end").val() != ""){ |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | function js_str($s) |
93 | 93 | { |
94 | - return '"' . addcslashes($s, "\0..\37\"\\") . '"'; |
|
94 | + return '"'.addcslashes($s, "\0..\37\"\\").'"'; |
|
95 | 95 | } |
96 | 96 | /** |
97 | 97 | * This function is to show the ticket form |
@@ -101,29 +101,29 @@ discard block |
||
101 | 101 | { |
102 | 102 | global $tools; |
103 | 103 | echo '<div class="ticket-form">'; |
104 | - echo '<form enctype="multipart/form-data" action="' . api_get_self() . '" method="post" name="send_ticket" id="send_ticket" |
|
104 | + echo '<form enctype="multipart/form-data" action="'.api_get_self().'" method="post" name="send_ticket" id="send_ticket" |
|
105 | 105 | onsubmit="return validate()" style="width:100%">'; |
106 | 106 | $select_course = '<div id="user_request" > |
107 | 107 | </div>'; |
108 | 108 | echo $select_course; |
109 | 109 | //select status |
110 | 110 | $select_tool = '<div class="row" > |
111 | - <div class="label2" >' . get_lang('Tool') .':</div> |
|
111 | + <div class="label2" >' . get_lang('Tool').':</div> |
|
112 | 112 | <div class="formw2">'; |
113 | 113 | $select_tool .= '<select style="width: 95%; " name = "tool" id="tool" >'; |
114 | 114 | |
115 | 115 | foreach ($tools as $tool) { |
116 | - $select_tool .= "<option value = '" . $tool['id'] . "' selected >" . $tool['name'] . "</option>"; |
|
116 | + $select_tool .= "<option value = '".$tool['id']."' selected >".$tool['name']."</option>"; |
|
117 | 117 | } |
118 | 118 | $select_tool .= "</select>"; |
119 | 119 | $select_tool .= '</div></div>'; |
120 | 120 | echo $select_tool; |
121 | 121 | echo '<div class="row"> |
122 | - <div class="label2">' . get_lang('From') . ':</div> |
|
122 | + <div class="label2">' . get_lang('From').':</div> |
|
123 | 123 | <div class="formw2"><input id="keyword_start_date_start" name="keyword_start_date_start" type="text"></div> |
124 | 124 | </div> |
125 | 125 | <div class="row"> |
126 | - <div class="label2"> ' . get_lang('To') . '</div> |
|
126 | + <div class="label2"> ' . get_lang('To').'</div> |
|
127 | 127 | <div class="formw2"><input id="keyword_start_date_end" name="keyword_start_date_end" type="text"></div> |
128 | 128 | </div>'; |
129 | 129 | echo '</div>'; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | <div class="label2"> |
132 | 132 | </div> |
133 | 133 | <div class="formw2"> |
134 | - <button class="save" name="report" type="submit" id="btnsubmit" disabled="disabled">' . get_lang('CompleteReport') .'</button> |
|
134 | + <button class="save" name="report" type="submit" id="btnsubmit" disabled="disabled">' . get_lang('CompleteReport').'</button> |
|
135 | 135 | </div> |
136 | 136 | </div>'; |
137 | 137 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $sql = "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u"; |
147 | 147 | if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) { |
148 | 148 | $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
149 | - $sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)"; |
|
149 | + $sql .= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)"; |
|
150 | 150 | } |
151 | 151 | if (isset($_GET['keyword'])) { |
152 | 152 | $keyword = Database::escape_string(trim($_GET['keyword'])); |
@@ -221,10 +221,10 @@ discard block |
||
221 | 221 | $webPath = api_get_path(WEB_PATH); |
222 | 222 | while ($user = Database::fetch_row($res)) { |
223 | 223 | $userPicture = UserManager::getUserPicture($user[0]); |
224 | - $photo = '<img src="' . $userPicture . '" alt="' . api_get_person_name($user[2], $user[3]) . '" title="' . api_get_person_name($user[2], $user[3]) . '" />'; |
|
224 | + $photo = '<img src="'.$userPicture.'" alt="'.api_get_person_name($user[2], $user[3]).'" title="'.api_get_person_name($user[2], $user[3]).'" />'; |
|
225 | 225 | $user_id = $user[0]; |
226 | - $button = '<a href="javascript:void(0)" onclick="load_course_list(\'div_' . $user_id . '\',' . $user_id . ')"> |
|
227 | - <img onclick="load_course_list(\'div_' . $user_id . '\',' . $user_id . ')" src="' . $webPath . 'img/view_more_stats.gif" title="' . get_lang('Courses') . '" alt="' . get_lang('Courses') . '"/> |
|
226 | + $button = '<a href="javascript:void(0)" onclick="load_course_list(\'div_'.$user_id.'\','.$user_id.')"> |
|
227 | + <img onclick="load_course_list(\'div_' . $user_id.'\','.$user_id.')" src="'.$webPath.'img/view_more_stats.gif" title="'.get_lang('Courses').'" alt="'.get_lang('Courses').'"/> |
|
228 | 228 | </a> '; |
229 | 229 | $users[] = array( |
230 | 230 | $photo, |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | Display::display_header('Reports'); |
244 | 244 | echo '<div class="actions"> |
245 | - <form action="' . api_get_self() . '" method="get" name="search_simple" id="search_simple"> |
|
245 | + <form action="' . api_get_self().'" method="get" name="search_simple" id="search_simple"> |
|
246 | 246 | <input name="user_id_request" id="user_id_request" type="hidden" value=""> |
247 | 247 | <span><label for="keyword">Búsqueda del usuario: </label><input size="25" name="keyword" type="text" id="keyword"></span> |
248 | 248 | <span><button class="search" name="submit" type="submit">Buscar</button></span> |
@@ -276,12 +276,12 @@ discard block |
||
276 | 276 | u.username , CONCAT(u.lastname, ' ', u.firstname) AS fullname, |
277 | 277 | DATE_SUB(access.access_date,INTERVAL 5 HOUR) AS access_date, |
278 | 278 | c.title AS course, access_tool AS tool |
279 | - FROM " . Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS) . " access |
|
280 | - LEFT JOIN " . Database::get_main_table(TABLE_MAIN_USER) . " u ON access.access_user_id = u.user_id |
|
281 | - LEFT JOIN " . Database::get_main_table(TABLE_MAIN_COURSE) . " c ON access.c_id = c.id |
|
282 | - WHERE access.c_id = " . $course_info['real_id'] . " AND u.user_id = $user_id "; |
|
279 | + FROM " . Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS)." access |
|
280 | + LEFT JOIN " . Database::get_main_table(TABLE_MAIN_USER)." u ON access.access_user_id = u.user_id |
|
281 | + LEFT JOIN " . Database::get_main_table(TABLE_MAIN_COURSE)." c ON access.c_id = c.id |
|
282 | + WHERE access.c_id = " . $course_info['real_id']." AND u.user_id = $user_id "; |
|
283 | 283 | if ($tool != '') { |
284 | - $sql.="AND access.access_tool = '$tool' "; |
|
284 | + $sql .= "AND access.access_tool = '$tool' "; |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | $start_date = Database::escape_string($_POST['keyword_start_date_start']); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | if ($start_date != '') |
293 | 293 | $sql .= " access_date >= '$start_date' "; |
294 | 294 | if ($end_date != '') { |
295 | - $sql = ($start_date == '') ? $sql : ($sql . " AND "); |
|
295 | + $sql = ($start_date == '') ? $sql : ($sql." AND "); |
|
296 | 296 | $sql .= " access_date <= '$end_date' "; |
297 | 297 | } |
298 | 298 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | if (!api_is_allowed_to_edit()) { |
17 | 17 | Display::display_error_message($plugin->get_lang("DeniedAccess")); |
18 | 18 | } else { |
19 | - $sql = "UPDATE " . Database::get_main_table('rp_reporte_semanas') . " |
|
19 | + $sql = "UPDATE ".Database::get_main_table('rp_reporte_semanas')." |
|
20 | 20 | SET work_id = '$work_id', forum_id = '$forum_id' |
21 | 21 | WHERE id ='$rs_id'"; |
22 | 22 | Database::query($sql); |
@@ -38,8 +38,8 @@ |
||
38 | 38 | $courseSelect = Display::select('course_id', $arrCourseList, 0, array(), false); |
39 | 39 | $courseControl = Display::div($courseSelect, array('class' => 'controls')); |
40 | 40 | |
41 | -$userDiv = Display::div($userLabel . " " . $userControl, array('class' => 'control-group')); |
|
42 | -$courseDiv = Display::div($courseLabel . " " . $courseControl, array('class' => 'control-group')); |
|
41 | +$userDiv = Display::div($userLabel." ".$userControl, array('class' => 'control-group')); |
|
42 | +$courseDiv = Display::div($courseLabel." ".$courseControl, array('class' => 'control-group')); |
|
43 | 43 | echo $userDiv; |
44 | 44 | echo $courseDiv; |
45 | 45 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | if (!empty($gradebook) && $gradebook == 'view') { |
66 | 66 | $interbreadcrumb[] = array( |
67 | - 'url' => '../gradebook/' . $_SESSION['gradebook_dest'], |
|
67 | + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
|
68 | 68 | 'name' => get_lang('ToolGradebook'), |
69 | 69 | ); |
70 | 70 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | switch ($_GET['content']) { |
80 | 80 | case 'forum': |
81 | 81 | $interbreadcrumb[] = array( |
82 | - 'url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(), |
|
82 | + 'url' => 'index.php?search='.$search_forum.'&'.api_get_cidreq(), |
|
83 | 83 | 'name' => get_lang('Forum'), |
84 | 84 | ); |
85 | 85 | $interbreadcrumb[] = array( |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | break; |
90 | 90 | case 'forumcategory': |
91 | 91 | $interbreadcrumb[] = array( |
92 | - 'url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(), |
|
92 | + 'url' => 'index.php?search='.$search_forum.'&'.api_get_cidreq(), |
|
93 | 93 | 'name' => get_lang('Forum'), |
94 | 94 | ); |
95 | 95 | $interbreadcrumb[] = array( |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | . "&gradebook=&action=add_item&type=step&lp_id=$lp_id#resource_tab-5\">" |
186 | 186 | . Display::return_icon( |
187 | 187 | 'back.png', |
188 | - get_lang("BackTo") . ' ' . get_lang("LearningPaths"), |
|
188 | + get_lang("BackTo").' '.get_lang("LearningPaths"), |
|
189 | 189 | '', |
190 | 190 | ICON_SIZE_MEDIUM |
191 | 191 | ) |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | |
198 | 198 | if (api_is_allowed_to_edit(false, true)) { |
199 | 199 | echo '<a href="' |
200 | - . api_get_self() . '?' . api_get_cidreq() |
|
201 | - . '&action=add&content=forumcategory&lp_id=' . $lp_id . '"> ' . |
|
200 | + . api_get_self().'?'.api_get_cidreq() |
|
201 | + . '&action=add&content=forumcategory&lp_id='.$lp_id.'"> '. |
|
202 | 202 | Display::return_icon( |
203 | 203 | 'new_folder.png', get_lang('AddForumCategory'), '', ICON_SIZE_MEDIUM |
204 | 204 | ) |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | ); |
249 | 249 | |
250 | 250 | if (empty($sessionId) && !empty($forumCategory['session_name'])) { |
251 | - $session_displayed = ' (' . Security::remove_XSS($forumCategory['session_name']) . ')'; |
|
251 | + $session_displayed = ' ('.Security::remove_XSS($forumCategory['session_name']).')'; |
|
252 | 252 | } else { |
253 | 253 | $session_displayed = ''; |
254 | 254 | } |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $html = ''; |
261 | 261 | $iconsEdit = ''; |
262 | 262 | $idCategory = $forumCategory['cat_id']; |
263 | - $urlCategory = 'viewforumcategory.php?' . api_get_cidreq() . '&forumcategory=' . intval($idCategory); |
|
263 | + $urlCategory = 'viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.intval($idCategory); |
|
264 | 264 | $titleCategory = Display::tag( |
265 | 265 | 'a', |
266 | 266 | $forumCategory['cat_title'], |
@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | !($forumCategory['session_id'] == 0 && |
279 | 279 | intval($sessionId) != 0) |
280 | 280 | ) { |
281 | - $iconsEdit .= '<a href="' . api_get_self() . '?' . api_get_cidreq() |
|
282 | - . '&action=edit&content=forumcategory&id=' . intval($idCategory) |
|
283 | - . '">' . Display::return_icon( |
|
281 | + $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
282 | + . '&action=edit&content=forumcategory&id='.intval($idCategory) |
|
283 | + . '">'.Display::return_icon( |
|
284 | 284 | 'edit.png', |
285 | 285 | get_lang('Edit'), |
286 | 286 | array(), |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | ) |
289 | 289 | . '</a>'; |
290 | 290 | |
291 | - $iconsEdit .='<a href="' . api_get_self() . '?' . api_get_cidreq() |
|
292 | - . '&action=delete&content=forumcategory&id=' . intval($idCategory) |
|
291 | + $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
292 | + . '&action=delete&content=forumcategory&id='.intval($idCategory) |
|
293 | 293 | . "\" onclick=\"javascript:if(!confirm('" |
294 | 294 | . addslashes(api_htmlentities( |
295 | 295 | get_lang('DeleteForumCategory'), |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | ICON_SIZE_SMALL |
304 | 304 | ) |
305 | 305 | . '</a>'; |
306 | - $iconsEdit .= return_visible_invisible_icon( |
|
306 | + $iconsEdit .= return_visible_invisible_icon( |
|
307 | 307 | 'forumcategory', |
308 | 308 | strval(intval($idCategory)), |
309 | 309 | strval(intval($forumCategory['visibility'])) |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | array(), |
338 | 338 | ICON_SIZE_MEDIUM |
339 | 339 | ); |
340 | - $html .= '<h3>' . $icoCategory . $titleCategory . '</h3>'; |
|
340 | + $html .= '<h3>'.$icoCategory.$titleCategory.'</h3>'; |
|
341 | 341 | |
342 | 342 | if ($descriptionCategory != '' && trim($descriptionCategory) != ' ') { |
343 | 343 | $html .= '<div class="forum-description">'.$descriptionCategory.'</div>'; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | // Showing the image |
409 | 409 | if (!empty($forum['forum_image'])) { |
410 | 410 | |
411 | - $image_path = api_get_path(WEB_COURSE_PATH). api_get_course_path(). '/upload/forum/images/'. $forum['forum_image']; |
|
411 | + $image_path = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/forum/images/'.$forum['forum_image']; |
|
412 | 412 | $image_size = api_getimagesize($image_path); |
413 | 413 | $img_attributes = ''; |
414 | 414 | if (!empty($image_size)) { |
@@ -455,15 +455,15 @@ discard block |
||
455 | 455 | 30 |
456 | 456 | ); |
457 | 457 | $forum_title_group_addition = ' (<a href="../group/group_space.php?' |
458 | - . api_get_cidreq() . '&gidReq=' . $forum['forum_of_group'] |
|
459 | - . '" class="forum_group_link">' . get_lang('GoTo') . ' ' . $group_title . '</a>)' |
|
458 | + . api_get_cidreq().'&gidReq='.$forum['forum_of_group'] |
|
459 | + . '" class="forum_group_link">'.get_lang('GoTo').' '.$group_title.'</a>)' |
|
460 | 460 | . $session_img; |
461 | 461 | } else { |
462 | 462 | $forum_title_group_addition = ''; |
463 | 463 | } |
464 | 464 | |
465 | 465 | if (empty($sessionId) && !empty($forum['session_name'])) { |
466 | - $session_displayed = ' (' . $forum['session_name'] . ')'; |
|
466 | + $session_displayed = ' ('.$forum['session_name'].')'; |
|
467 | 467 | } else { |
468 | 468 | $session_displayed = ''; |
469 | 469 | } |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | $html .= '<div class="row">'; |
476 | 476 | $html .= '<div class="col-md-6">'; |
477 | 477 | $html .= '<div class="col-md-3">'; |
478 | - $html .= '<div class="number-post">'.$forum_image.'<p>'.$number_threads.' ' . get_lang('ForumThreads') . '</p>' |
|
478 | + $html .= '<div class="number-post">'.$forum_image.'<p>'.$number_threads.' '.get_lang('ForumThreads').'</p>' |
|
479 | 479 | . '</div>'; |
480 | 480 | $html .= '</div>'; |
481 | 481 | |
@@ -491,9 +491,9 @@ discard block |
||
491 | 491 | 'a', |
492 | 492 | $forum['forum_title'], |
493 | 493 | [ |
494 | - 'href' => 'viewforum.php?' . api_get_cidreq() |
|
495 | - . '&gidReq=' . intval($groupid) |
|
496 | - . '&forum=' . intval($forum['forum_id']), |
|
494 | + 'href' => 'viewforum.php?'.api_get_cidreq() |
|
495 | + . '&gidReq='.intval($groupid) |
|
496 | + . '&forum='.intval($forum['forum_id']), |
|
497 | 497 | 'class' => return_visible_invisible(strval(intval($forum['visibility']))) |
498 | 498 | ] |
499 | 499 | ); |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | } |
506 | 506 | } |
507 | 507 | |
508 | - $html .= '<h3 class="title">' . $iconForum . $linkForum . '</h3>'; |
|
508 | + $html .= '<h3 class="title">'.$iconForum.$linkForum.'</h3>'; |
|
509 | 509 | $html .= Display::tag( |
510 | 510 | 'p', |
511 | 511 | Security::remove_XSS($forum['forum_comment']), |
@@ -520,9 +520,9 @@ discard block |
||
520 | 520 | |
521 | 521 | // The number of topics and posts. |
522 | 522 | if ($forum['forum_of_group'] !== '0') { |
523 | - $newPost=''; |
|
523 | + $newPost = ''; |
|
524 | 524 | if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
525 | - $newPost = ' ' . Display::return_icon( |
|
525 | + $newPost = ' '.Display::return_icon( |
|
526 | 526 | 'alert.png', |
527 | 527 | get_lang('Forum'), |
528 | 528 | null, |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | } |
534 | 534 | } else { |
535 | 535 | if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
536 | - $newPost = ' ' . Display::return_icon( |
|
536 | + $newPost = ' '.Display::return_icon( |
|
537 | 537 | 'alert.png', |
538 | 538 | get_lang('Forum'), |
539 | 539 | null, |
@@ -575,9 +575,9 @@ discard block |
||
575 | 575 | null, |
576 | 576 | ICON_SIZE_TINY |
577 | 577 | ) |
578 | - . ' ' . |
|
578 | + . ' '. |
|
579 | 579 | api_convert_and_format_date($forum['last_post_date']) |
580 | - . '<br /> ' . get_lang('By') . ' ' . |
|
580 | + . '<br /> '.get_lang('By').' '. |
|
581 | 581 | display_user_link( |
582 | 582 | $poster_id, |
583 | 583 | $name, |
@@ -591,13 +591,13 @@ discard block |
||
591 | 591 | if (api_is_allowed_to_edit(false, true) && |
592 | 592 | !($forum['session_id'] == 0 && intval($sessionId) != 0) |
593 | 593 | ) { |
594 | - $html .= '<a href="'.api_get_self() . '?' . api_get_cidreq() |
|
595 | - . '&action=edit&content=forum&id=' . $forum['forum_id'] . '">' |
|
594 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
595 | + . '&action=edit&content=forum&id='.$forum['forum_id'].'">' |
|
596 | 596 | . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) |
597 | 597 | . '</a>'; |
598 | - $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() |
|
599 | - . '&action=delete&content=forum&id=' . $forum['forum_id'] |
|
600 | - . "\" onclick=\"javascript:if(!confirm('" . addslashes( |
|
598 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
599 | + . '&action=delete&content=forum&id='.$forum['forum_id'] |
|
600 | + . "\" onclick=\"javascript:if(!confirm('".addslashes( |
|
601 | 601 | api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES) |
602 | 602 | ) |
603 | 603 | . "')) return false;\">" |
@@ -638,8 +638,8 @@ discard block |
||
638 | 638 | !api_is_anonymous() && |
639 | 639 | api_is_allowed_to_session_edit(false, true) |
640 | 640 | ) { |
641 | - $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() |
|
642 | - . '&action=notify&content=forum&id=' . $forum['forum_id'] . '">' |
|
641 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
642 | + . '&action=notify&content=forum&id='.$forum['forum_id'].'">' |
|
643 | 643 | . Display::return_icon($iconnotify, get_lang('NotifyMe'), null, ICON_SIZE_SMALL) |
644 | 644 | . '</a>'; |
645 | 645 | } |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | } |
657 | 657 | } |
658 | 658 | } else { |
659 | - echo '<div class="alert alert-warning">' . get_lang('NoForumInThisCategory') . '</div>' |
|
659 | + echo '<div class="alert alert-warning">'.get_lang('NoForumInThisCategory').'</div>' |
|
660 | 660 | . (api_is_allowed_to_edit(false, true) ? '<div>' : '</div>') |
661 | 661 | . '</div>'; |
662 | 662 | } |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | $settings = []; |
64 | 64 | |
65 | 65 | foreach ($settingsInfo as $settingInfo) { |
66 | - $variable = str_replace($this->get_name() . '_', '', $settingInfo['variable']); |
|
66 | + $variable = str_replace($this->get_name().'_', '', $settingInfo['variable']); |
|
67 | 67 | |
68 | 68 | $settings[$variable] = $settingInfo['selected_value']; |
69 | 69 | } |
70 | 70 | |
71 | 71 | $url = "https://login.microsoftonline.com/{$settings[self::SETTING_TENANT]}/oauth2/v2.0/"; |
72 | - $callback = api_get_path(WEB_PLUGIN_PATH) . $this->get_name() . '/src/callback.php'; |
|
72 | + $callback = api_get_path(WEB_PLUGIN_PATH).$this->get_name().'/src/callback.php'; |
|
73 | 73 | |
74 | 74 | if ($urlType === self::URL_TYPE_SIGNOUT) { |
75 | 75 | $action = 'logout'; |
@@ -97,6 +97,6 @@ discard block |
||
97 | 97 | ]; |
98 | 98 | } |
99 | 99 | |
100 | - return $url . $action . '?' . http_build_query($urlParams); |
|
100 | + return $url.$action.'?'.http_build_query($urlParams); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | \ No newline at end of file |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | -require dirname(__FILE__) . '/../../../main/inc/global.inc.php'; |
|
3 | -require_once dirname(__FILE__) . '/../../../main/auth/external_login/functions.inc.php'; |
|
2 | +require dirname(__FILE__).'/../../../main/inc/global.inc.php'; |
|
3 | +require_once dirname(__FILE__).'/../../../main/auth/external_login/functions.inc.php'; |
|
4 | 4 | |
5 | 5 | if (isset($_POST['error']) || empty($_REQUEST)) { |
6 | - header('Location: ' . api_get_path(WEB_PATH) . 'index.php?logout=logout'); |
|
6 | + header('Location: '.api_get_path(WEB_PATH).'index.php?logout=logout'); |
|
7 | 7 | exit; |
8 | 8 | } |
9 | 9 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | 'username' => $jwtPayload->emails[0], |
26 | 26 | 'language' => 'en', |
27 | 27 | 'password' => 'azure_active_directory', |
28 | - 'auth_source' => 'azure_active_directory ' . $jwtPayload->idp, |
|
28 | + 'auth_source' => 'azure_active_directory '.$jwtPayload->idp, |
|
29 | 29 | 'extra' => array() |
30 | 30 | ); |
31 | 31 | |
@@ -51,5 +51,5 @@ discard block |
||
51 | 51 | $_SESSION['_user'] = $_user; |
52 | 52 | } |
53 | 53 | |
54 | -header('Location: ' . api_get_path(WEB_PATH)); |
|
54 | +header('Location: '.api_get_path(WEB_PATH)); |
|
55 | 55 | exit; |
@@ -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)) { |