@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $nameTools = get_lang('PlatformAdmin'); |
20 | 20 | |
21 | 21 | $accessUrlId = 0; |
22 | -$adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/admin/"; |
|
22 | +$adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/admin/"; |
|
23 | 23 | |
24 | 24 | if (api_is_multiple_url_enabled()) { |
25 | 25 | $accessUrlId = api_get_current_access_url_id(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $urlInfo = api_get_access_url($accessUrlId); |
29 | 29 | $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url'])); |
30 | 30 | $cleanUrl = str_replace('/', '-', $url); |
31 | - $adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/$cleanUrl/admin/"; |
|
31 | + $adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/$cleanUrl/admin/"; |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | <div class="form-group"> |
85 | 85 | <input class="form-control" type="text" name="keyword" value=""> |
86 | 86 | <button class="btn btn-default" type="submit"> |
87 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
87 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
88 | 88 | </button> |
89 | 89 | </div> |
90 | 90 | </form>'; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | <div class="form-group"> |
138 | 138 | <input class="form-control" type="text" name="keyword" value=""> |
139 | 139 | <button class="btn btn-default" type="submit"> |
140 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
140 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
141 | 141 | </button> |
142 | 142 | </div> |
143 | 143 | </form>'; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | <input class="form-control" type="text" name="search_field" value="" > |
198 | 198 | <input type="hidden" value="search_setting" name="category"> |
199 | 199 | <button class="btn btn-default" type="submit"> |
200 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
200 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
201 | 201 | </button> |
202 | 202 | </div> |
203 | 203 | </form>'; |
@@ -210,24 +210,24 @@ discard block |
||
210 | 210 | $items[] = array('url' => 'settings.php?category=Regions', 'label' => get_lang('Regions')); |
211 | 211 | $items[] = array('url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements')); |
212 | 212 | $items[] = array( |
213 | - 'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin', |
|
213 | + 'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin', |
|
214 | 214 | 'label' => get_lang('GlobalAgenda') |
215 | 215 | ); |
216 | 216 | $items[] = array('url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage')); |
217 | 217 | $items[] = array('url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription')); |
218 | 218 | $items[] = array('url' => 'statistics/index.php', 'label' => get_lang('Statistics')); |
219 | 219 | $items[] = array( |
220 | - 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php', |
|
220 | + 'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php', |
|
221 | 221 | 'label' => get_lang('Reports') |
222 | 222 | ); |
223 | 223 | $items[] = array( |
224 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php', |
|
224 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php', |
|
225 | 225 | 'label' => get_lang('TeacherTimeReport') |
226 | 226 | ); |
227 | 227 | |
228 | 228 | if (api_get_configuration_value('chamilo_cms')) { |
229 | 229 | $items[] = array( |
230 | - 'url' => api_get_path(WEB_PATH) . 'web/app_dev.php/administration/dashboard', |
|
230 | + 'url' => api_get_path(WEB_PATH).'web/app_dev.php/administration/dashboard', |
|
231 | 231 | 'label' => get_lang('CMS') |
232 | 232 | ); |
233 | 233 | } |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | <div class="form-group"> |
278 | 278 | <input class="form-control" type="text" name="keyword" value=""> |
279 | 279 | <button class="btn btn-default" type="submit"> |
280 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
280 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
281 | 281 | </button> |
282 | 282 | </div> |
283 | 283 | </form>'; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | |
306 | 306 | if (api_is_platform_admin()) { |
307 | 307 | // option only visible in development mode. Enable through code if required |
308 | - if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) { |
|
308 | + if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) { |
|
309 | 309 | $items[] = array('url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats')); |
310 | 310 | } |
311 | 311 | $items[] = array('url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions')); |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $items = array(); |
332 | 332 | $items[] = array('url' => 'special_exports.php', 'label' => get_lang('SpecialExports')); |
333 | 333 | $items[] = array('url' => 'system_status.php', 'label' => get_lang('SystemStatus')); |
334 | - if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) { |
|
334 | + if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) { |
|
335 | 335 | $items[] = array('url' => 'filler.php', 'label' => get_lang('DataFiller')); |
336 | 336 | } |
337 | 337 | |
@@ -375,15 +375,15 @@ discard block |
||
375 | 375 | $items[] = array('url' => 'skills_wheel.php', 'label' => get_lang('SkillsWheel')); |
376 | 376 | $items[] = array('url' => 'skills_import.php', 'label' => get_lang('SkillsImport')); |
377 | 377 | $items[] = array('url' => 'skill_list.php', 'label' => get_lang('ManageSkills')); |
378 | - $items[] = array('url'=>'skill.php', 'label' => get_lang('ManageSkillsLevels')); |
|
378 | + $items[] = array('url'=>'skill.php', 'label' => get_lang('ManageSkillsLevels')); |
|
379 | 379 | //$items[] = array('url'=>'skills_profile.php', 'label' => get_lang('SkillsProfile')); |
380 | 380 | $items[] = array( |
381 | - 'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php', |
|
381 | + 'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php', |
|
382 | 382 | 'label' => get_lang('SkillsRanking') |
383 | 383 | ); |
384 | 384 | $items[] = array('url' => 'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks')); |
385 | 385 | $items[] = array( |
386 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php', |
|
386 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', |
|
387 | 387 | 'label' => get_lang('Badges') |
388 | 388 | ); |
389 | 389 | $blocks['skills']['items'] = $items; |
@@ -426,12 +426,12 @@ discard block |
||
426 | 426 | $itemUrl = '/start.php'; |
427 | 427 | } |
428 | 428 | |
429 | - if (!file_exists(api_get_path(SYS_PLUGIN_PATH) . $pluginName . $itemUrl)) { |
|
429 | + if (!file_exists(api_get_path(SYS_PLUGIN_PATH).$pluginName.$itemUrl)) { |
|
430 | 430 | continue; |
431 | 431 | } |
432 | 432 | |
433 | 433 | $items[] = array( |
434 | - 'url' => api_get_path(WEB_PLUGIN_PATH) . $plugin_name . $itemUrl, |
|
434 | + 'url' => api_get_path(WEB_PLUGIN_PATH).$plugin_name.$itemUrl, |
|
435 | 435 | 'label' => $plugin_info['title'] |
436 | 436 | ); |
437 | 437 | } |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | } |
511 | 511 | //end hack |
512 | 512 | } |
513 | -$admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php'; |
|
513 | +$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php'; |
|
514 | 514 | |
515 | 515 | $tpl = new Template(); |
516 | 516 | |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | die; |
564 | 564 | } |
565 | 565 | |
566 | - $fullFilePath = $adminExtraContentDir . $extraData['block']; |
|
566 | + $fullFilePath = $adminExtraContentDir.$extraData['block']; |
|
567 | 567 | $fullFilePath .= "_extra.html"; |
568 | 568 | |
569 | 569 | file_put_contents($fullFilePath, $extraData['extra_content']); |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | // get message user id for inbox/outbox |
50 | 50 | $message_uid = ''; |
51 | -$message_type = array('inbox','outbox'); |
|
52 | -if (in_array($_GET['type'],$message_type)) { |
|
51 | +$message_type = array('inbox', 'outbox'); |
|
52 | +if (in_array($_GET['type'], $message_type)) { |
|
53 | 53 | if ($_GET['type'] == 'inbox') { |
54 | 54 | $message_uid = $row_users['user_receiver_id']; |
55 | 55 | } else { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | if (!empty($row_users['group_id'])) { |
65 | 65 | $users_group = $userGroup->get_all_users_by_group($row_users['group_id']); |
66 | - if (!in_array($current_uid,array_keys($users_group))) { |
|
66 | + if (!in_array($current_uid, array_keys($users_group))) { |
|
67 | 67 | $not_allowed_to_edit = true; |
68 | 68 | } |
69 | 69 | } else { |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | $sublanguage_available = Database::escape_string($sublanguage_available); |
40 | 40 | $parent_id = intval($parent_id); |
41 | 41 | |
42 | - $sql = 'INSERT INTO ' . $tbl_admin_languages . '(original_name,english_name,isocode,dokeos_folder,available,parent_id) |
|
43 | - VALUES ("' . $original_name . '","' . $english_name . '","' . $isocode . '","' . $english_name . '","' . $sublanguage_available . '","' . $parent_id . '")'; |
|
42 | + $sql = 'INSERT INTO '.$tbl_admin_languages.'(original_name,english_name,isocode,dokeos_folder,available,parent_id) |
|
43 | + VALUES ("' . $original_name.'","'.$english_name.'","'.$isocode.'","'.$english_name.'","'.$sublanguage_available.'","'.$parent_id.'")'; |
|
44 | 44 | $res = Database::query($sql); |
45 | 45 | if ($res === false) { |
46 | 46 | return false; |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | function check_if_language_exist($original_name, $english_name, $isocode, $sublanguage_available) |
66 | 66 | { |
67 | 67 | $tbl_admin_languages = Database:: get_main_table(TABLE_MAIN_LANGUAGE); |
68 | - $sql_original_name = 'SELECT count(*) AS count_original_name FROM ' . $tbl_admin_languages . ' WHERE original_name="' . Database::escape_string($original_name) . '" '; |
|
69 | - $sql_english_name = 'SELECT count(*) AS count_english_name FROM ' . $tbl_admin_languages . ' WHERE english_name="' . Database::escape_string($english_name) . '" '; |
|
68 | + $sql_original_name = 'SELECT count(*) AS count_original_name FROM '.$tbl_admin_languages.' WHERE original_name="'.Database::escape_string($original_name).'" '; |
|
69 | + $sql_english_name = 'SELECT count(*) AS count_english_name FROM '.$tbl_admin_languages.' WHERE english_name="'.Database::escape_string($english_name).'" '; |
|
70 | 70 | //$sql_isocode='SELECT count(*) AS count_isocode FROM '.$tbl_admin_languages.' WHERE isocode="'.Database::escape_string($isocode).'" '; |
71 | 71 | $rs_original_name = Database::query($sql_original_name); |
72 | 72 | $rs_english_name = Database::query($sql_english_name); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | function ckeck_if_is_parent_of_sub_language($parent_id) |
124 | 124 | { |
125 | - $sql = 'SELECT count(*) AS count FROM language WHERE parent_id= ' . intval($parent_id) . ''; |
|
125 | + $sql = 'SELECT count(*) AS count FROM language WHERE parent_id= '.intval($parent_id).''; |
|
126 | 126 | $rs = Database::query($sql); |
127 | 127 | if (Database::num_rows($rs) > 0 && Database::result($rs, 0, 'count') == 1) { |
128 | 128 | return true; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | -$language_name = get_lang('CreateSubLanguageForLanguage') . ' ( ' . strtolower($language_name) . ' )'; |
|
186 | +$language_name = get_lang('CreateSubLanguageForLanguage').' ( '.strtolower($language_name).' )'; |
|
187 | 187 | |
188 | 188 | if (ckeck_if_is_parent_of_sub_language($parent_id) === true && isset($_GET['action']) && $_GET['action'] == 'deletesublanguage') { |
189 | 189 | $language_name = get_lang('DeleteSubLanguage'); |
@@ -204,15 +204,15 @@ discard block |
||
204 | 204 | foreach ($check_information as $index_information => $value_information) { |
205 | 205 | $allow_insert_info = false; |
206 | 206 | if ($index_information == 'original_name') { |
207 | - $msg .= Display::return_message(get_lang('AlreadyExists') . ' "' . get_lang('OriginalName') . '" ' . '(' . $original_name . ')', |
|
207 | + $msg .= Display::return_message(get_lang('AlreadyExists').' "'.get_lang('OriginalName').'" '.'('.$original_name.')', |
|
208 | 208 | 'error'); |
209 | 209 | } |
210 | 210 | if ($index_information == 'english_name') { |
211 | - $msg .= Display::return_message(get_lang('AlreadyExists') . ' "' . get_lang('EnglishName') . '" ' . '(' . $english_name . ')', |
|
211 | + $msg .= Display::return_message(get_lang('AlreadyExists').' "'.get_lang('EnglishName').'" '.'('.$english_name.')', |
|
212 | 212 | 'error'); |
213 | 213 | } |
214 | 214 | if ($index_information == 'isocode') { |
215 | - $msg .= Display::return_message(get_lang('CodeDoesNotExists') . ': ' . $isocode . '', 'error'); |
|
215 | + $msg .= Display::return_message(get_lang('CodeDoesNotExists').': '.$isocode.'', 'error'); |
|
216 | 216 | } |
217 | 217 | if ($index_information == 'execute_add' && $value_information === true) { |
218 | 218 | $allow_insert_info = true; |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $english_name = api_strtolower($english_name); |
227 | 227 | |
228 | 228 | $isocode = str_replace(' ', '_', $isocode); |
229 | - $str_info = '<br/>' . get_lang('OriginalName') . ' : ' . $original_name . '<br/>' . get_lang('EnglishName') . ' : ' . $english_name . '<br/>' . get_lang('PlatformCharsetTitle') . ' : ' . $isocode; |
|
229 | + $str_info = '<br/>'.get_lang('OriginalName').' : '.$original_name.'<br/>'.get_lang('EnglishName').' : '.$english_name.'<br/>'.get_lang('PlatformCharsetTitle').' : '.$isocode; |
|
230 | 230 | |
231 | 231 | $mkdir_result = SubLanguageManager::add_language_directory($english_name); |
232 | 232 | if ($mkdir_result) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | SubLanguageManager::remove_language_directory($english_name); |
236 | 236 | $msg .= Display::return_message(get_lang('LanguageDirectoryNotWriteableContactAdmin'), 'error'); |
237 | 237 | } else { |
238 | - Display::addFlash(Display::return_message(get_lang('TheNewSubLanguageHasBeenAdded') . $str_info, null, false)); |
|
238 | + Display::addFlash(Display::return_message(get_lang('TheNewSubLanguageHasBeenAdded').$str_info, null, false)); |
|
239 | 239 | unset($interbreadcrumb); |
240 | 240 | $_GET['sub_language_id'] = $_REQUEST['sub_language_id'] = $sl_id; |
241 | 241 | require 'sub_language.php'; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | if (isset($_GET['action']) && $_GET['action'] == 'definenewsublanguage') { |
272 | 272 | $text = $language_name; |
273 | 273 | $form = new FormValidator('addsublanguage', 'post', |
274 | - 'sub_language_add.php?id=' . Security::remove_XSS($_GET['id']) . '&action=definenewsublanguage'); |
|
274 | + 'sub_language_add.php?id='.Security::remove_XSS($_GET['id']).'&action=definenewsublanguage'); |
|
275 | 275 | $class = 'add'; |
276 | 276 | $form->addElement('header', '', $text); |
277 | 277 | $form->addElement('text', 'original_name', get_lang('OriginalName'), 'class="input_titles"'); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $form->addElement('checkbox', 'sub_language_is_visible', '', get_lang('Visibility')); |
285 | 285 | $form->addButtonCreate(get_lang('CreateSubLanguage'), 'SubmitAddNewLanguage'); |
286 | 286 | //$values['original_name'] = $language_details['original_name'].'...'; -> cannot be used because of quickform filtering (freeze) |
287 | - $values['english_name'] = $language_details['english_name'] . '2'; |
|
287 | + $values['english_name'] = $language_details['english_name'].'2'; |
|
288 | 288 | $values['isocode'] = $language_details['isocode']; |
289 | 289 | $form->setDefaults($values); |
290 | 290 | $form->display(); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | if (isset($_GET['action']) && $_GET['action'] == 'deletesublanguage') { |
293 | 293 | $text = $language_name; |
294 | 294 | $form = new FormValidator('deletesublanguage', 'post', |
295 | - 'sub_language_add.php?id=' . Security::remove_XSS($_GET['id']) . '&sub_language_id=' . Security::remove_XSS($_GET['sub_language_id'])); |
|
295 | + 'sub_language_add.php?id='.Security::remove_XSS($_GET['id']).'&sub_language_id='.Security::remove_XSS($_GET['sub_language_id'])); |
|
296 | 296 | $class = 'minus'; |
297 | 297 | $form->addElement('header', '', $text); |
298 | 298 | $form->addElement('static', '', get_lang('OriginalName'), $original_name); |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | width: 600, |
27 | 27 | modal: true, |
28 | 28 | buttons: { |
29 | - ' . get_lang('Accept') . ': function(){ |
|
29 | + ' . get_lang('Accept').': function(){ |
|
30 | 30 | $("#frmResponsable").submit() |
31 | 31 | }, |
32 | - ' . ucfirst(get_lang('Close')) . ': function() { |
|
32 | + ' . ucfirst(get_lang('Close')).': function() { |
|
33 | 33 | $(this).dialog("close"); |
34 | 34 | } |
35 | 35 | } |
@@ -40,25 +40,25 @@ discard block |
||
40 | 40 | }); |
41 | 41 | |
42 | 42 | $(".responseyes").click(function () { |
43 | - if(!confirm("' . get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('Yes')) . '. ' . get_lang('IfYouAreSureTheTicketWillBeClosed') . '")){ |
|
43 | + if(!confirm("' . get_lang('AreYouSure').' : '.strtoupper(get_lang('Yes')).'. '.get_lang('IfYouAreSureTheTicketWillBeClosed').'")){ |
|
44 | 44 | return false; |
45 | 45 | } |
46 | 46 | }); |
47 | 47 | |
48 | 48 | $("input#responseno").click(function () { |
49 | - if(!confirm("' . get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('No')) . '")){ |
|
49 | + if(!confirm("' . get_lang('AreYouSure').' : '.strtoupper(get_lang('No')).'")){ |
|
50 | 50 | return false; |
51 | 51 | } |
52 | 52 | }); |
53 | 53 | |
54 | 54 | $("#unassign").click(function () { |
55 | - if (!confirm("' . get_lang('AreYouSureYouWantToUnassignTheTicket') . '")) { |
|
55 | + if (!confirm("' . get_lang('AreYouSureYouWantToUnassignTheTicket').'")) { |
|
56 | 56 | return false; |
57 | 57 | } |
58 | 58 | }); |
59 | 59 | |
60 | 60 | $("#close").click(function () { |
61 | - if (!confirm("' . get_lang('AreYouSureYouWantToCloseTheTicket') . '")) { |
|
61 | + if (!confirm("' . get_lang('AreYouSureYouWantToCloseTheTicket').'")) { |
|
62 | 62 | return false; |
63 | 63 | } |
64 | 64 | }); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | fckEditor1val = CKEDITOR.instances["content"].getData(); |
70 | 70 | document.getElementById("content").value= fckEditor1val; |
71 | 71 | if (fckEditor1val == ""){ |
72 | - alert("' . get_lang('Filled') . '"); |
|
72 | + alert("' . get_lang('Filled').'"); |
|
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $user_id |
200 | 200 | ); |
201 | 201 | Display::addFlash(Display::return_message(get_lang('Updated'))); |
202 | - header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id); |
|
202 | + header("Location:".api_get_self()."?ticket_id=".$ticket_id); |
|
203 | 203 | exit; |
204 | 204 | |
205 | 205 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | TicketManager::assign_ticket_user($_GET['ticket_id'], $_POST['admins']); |
213 | 213 | } |
214 | 214 | Display::addFlash(Display::return_message(get_lang('Updated'))); |
215 | - header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id); |
|
215 | + header("Location:".api_get_self()."?ticket_id=".$ticket_id); |
|
216 | 216 | exit; |
217 | 217 | break; |
218 | 218 | case 'unassign': |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | TicketManager::assign_ticket_user($_GET['ticket_id'], 0); |
221 | 221 | } |
222 | 222 | Display::addFlash(Display::return_message(get_lang('Updated'))); |
223 | - header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id); |
|
223 | + header("Location:".api_get_self()."?ticket_id=".$ticket_id); |
|
224 | 224 | exit; |
225 | 225 | break; |
226 | 226 | default: |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | } |
230 | 230 | |
231 | -$title = 'Ticket #' . $ticket['ticket']['code']; |
|
231 | +$title = 'Ticket #'.$ticket['ticket']['code']; |
|
232 | 232 | |
233 | 233 | if (!isset($_POST['compose'])) { |
234 | 234 | if (isset($_REQUEST['close'])) { |
@@ -274,9 +274,9 @@ discard block |
||
274 | 274 | </style>"; |
275 | 275 | } |
276 | 276 | if ($isAdmin) { |
277 | - $senderData = get_lang('AddedBy'). ' '.$ticket['ticket']['user_url'].' (' . $ticket['usuario']['username'] . ').'; |
|
277 | + $senderData = get_lang('AddedBy').' '.$ticket['ticket']['user_url'].' ('.$ticket['usuario']['username'].').'; |
|
278 | 278 | } else { |
279 | - $senderData = get_lang('AddedBy'). ' '.$ticket['usuario']['complete_name'].' (' . $ticket['usuario']['username']. ').'; |
|
279 | + $senderData = get_lang('AddedBy').' '.$ticket['usuario']['complete_name'].' ('.$ticket['usuario']['username'].').'; |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | echo '<table width="100%" > |
@@ -285,8 +285,8 @@ discard block |
||
285 | 285 | <h1>'.$title.' '.$form_close_ticket.'</h1> |
286 | 286 | <h2>'.$ticket['ticket']['subject'].'</h2> |
287 | 287 | <p> |
288 | - '.$senderData.' ' . |
|
289 | - get_lang('Created') . ' '. |
|
288 | + '.$senderData.' '. |
|
289 | + get_lang('Created').' '. |
|
290 | 290 | Display::url( |
291 | 291 | date_to_str_ago($ticket['ticket']['start_date_from_db']), |
292 | 292 | '#', |
@@ -302,37 +302,37 @@ discard block |
||
302 | 302 | </td> |
303 | 303 | </tr> |
304 | 304 | <tr> |
305 | - <td><p><b>' . get_lang('Category') . ': </b>' . $ticket['ticket']['name'] . '</p></td> |
|
305 | + <td><p><b>' . get_lang('Category').': </b>'.$ticket['ticket']['name'].'</p></td> |
|
306 | 306 | </tr> |
307 | 307 | <tr> |
308 | - <td><p ' . $bold . '><b>' . get_lang('Status') . ':</b> ' . $ticket['ticket']['status'] . '</p></td> |
|
308 | + <td><p ' . $bold.'><b>'.get_lang('Status').':</b> '.$ticket['ticket']['status'].'</p></td> |
|
309 | 309 | </tr> |
310 | 310 | <tr> |
311 | - <td><p><b>' . get_lang('Priority') . ': </b>' . $ticket['ticket']['priority'] . '<p></td> |
|
311 | + <td><p><b>' . get_lang('Priority').': </b>'.$ticket['ticket']['priority'].'<p></td> |
|
312 | 312 | </tr>'; |
313 | 313 | |
314 | 314 | if (!empty($ticket['ticket']['assigned_last_user'])) { |
315 | 315 | $assignedUser = api_get_user_info($ticket['ticket']['assigned_last_user']); |
316 | 316 | echo '<tr> |
317 | - <td><p><b>' . get_lang('AssignedTo') . ': </b>' . $assignedUser['complete_name'] . '<p></td> |
|
317 | + <td><p><b>' . get_lang('AssignedTo').': </b>'.$assignedUser['complete_name'].'<p></td> |
|
318 | 318 | </tr>'; |
319 | 319 | } else { |
320 | 320 | echo '<tr> |
321 | - <td><p><b>' . get_lang('AssignedTo') . ': </b>-<p></td> |
|
321 | + <td><p><b>' . get_lang('AssignedTo').': </b>-<p></td> |
|
322 | 322 | </tr>'; |
323 | 323 | } |
324 | 324 | if ($ticket['ticket']['course_url'] != null) { |
325 | 325 | if (!empty($ticket['ticket']['session_id'])) { |
326 | 326 | $sessionInfo = api_get_session_info($ticket['ticket']['session_id']); |
327 | 327 | echo '<tr> |
328 | - <td><b>' . get_lang('Session') . ':</b> ' . $sessionInfo['name'] . ' </td> |
|
328 | + <td><b>' . get_lang('Session').':</b> '.$sessionInfo['name'].' </td> |
|
329 | 329 | <td></td> |
330 | 330 | <td colspan="2"></td> |
331 | 331 | </tr>'; |
332 | 332 | } |
333 | 333 | |
334 | 334 | echo '<tr> |
335 | - <td><b>' . get_lang('Course') . ':</b> ' . $ticket['ticket']['course_url'] . ' </td> |
|
335 | + <td><b>' . get_lang('Course').':</b> '.$ticket['ticket']['course_url'].' </td> |
|
336 | 336 | <td></td> |
337 | 337 | <td colspan="2"></td> |
338 | 338 | </tr>'; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | echo '<tr> |
341 | 341 | <td> |
342 | 342 | <hr /> |
343 | - <b>' . get_lang('Description') . ':</b> <br /> |
|
343 | + <b>' . get_lang('Description').':</b> <br /> |
|
344 | 344 | '.$ticket['ticket']['message'].' |
345 | 345 | <hr /> |
346 | 346 | </td> |
@@ -360,9 +360,9 @@ discard block |
||
360 | 360 | |
361 | 361 | $receivedMessage = ''; |
362 | 362 | if (!empty($message['subject'])) { |
363 | - $receivedMessage = '<b>'.get_lang('Subject') . ': </b> '.$message['subject'].'<br/>'; |
|
363 | + $receivedMessage = '<b>'.get_lang('Subject').': </b> '.$message['subject'].'<br/>'; |
|
364 | 364 | } |
365 | - $receivedMessage = '<b>'.get_lang('Message') . ':</b><br/>'.$message['message'].'<br/>'; |
|
365 | + $receivedMessage = '<b>'.get_lang('Message').':</b><br/>'.$message['message'].'<br/>'; |
|
366 | 366 | |
367 | 367 | $attachmentLinks = ''; |
368 | 368 | if (isset($message['attachments'])) { |
@@ -374,9 +374,9 @@ discard block |
||
374 | 374 | } |
375 | 375 | } |
376 | 376 | |
377 | - $entireMessage = $receivedMessage . $attachmentLinks; |
|
377 | + $entireMessage = $receivedMessage.$attachmentLinks; |
|
378 | 378 | $counterLink = Display::url('#'.$counter, api_get_self().'?ticket_id='.$ticket_id.'#note-'.$counter); |
379 | - echo '<a id="note-'.$counter.'"> </a><h4>' . sprintf(get_lang('UpdatedByX'), $message['user_created']).' '.$date. |
|
379 | + echo '<a id="note-'.$counter.'"> </a><h4>'.sprintf(get_lang('UpdatedByX'), $message['user_created']).' '.$date. |
|
380 | 380 | ' <span class="pull-right">'.$counterLink.'</span></h4>'; |
381 | 381 | echo Display::div( |
382 | 382 | $entireMessage, |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | $counter++; |
386 | 386 | } |
387 | 387 | |
388 | - $subject = get_lang('ReplyShort') .': '.$ticket['ticket']['subject']; |
|
388 | + $subject = get_lang('ReplyShort').': '.$ticket['ticket']['subject']; |
|
389 | 389 | |
390 | 390 | if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED && |
391 | 391 | $ticket['ticket']['status_id'] != TicketManager::STATUS_CLOSE |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | } |
438 | 438 | } |
439 | 439 | Display::addFlash(Display::return_message(get_lang('Saved'))); |
440 | - header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id); |
|
440 | + header("Location:".api_get_self()."?ticket_id=".$ticket_id); |
|
441 | 441 | exit; |
442 | 442 | } |
443 | 443 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $form = new FormValidator( |
453 | 453 | 'send_ticket', |
454 | 454 | 'POST', |
455 | - api_get_self() . '?ticket_id=' . $ticket['id'], |
|
455 | + api_get_self().'?ticket_id='.$ticket['id'], |
|
456 | 456 | '', |
457 | 457 | array( |
458 | 458 | 'enctype' => 'multipart/form-data', |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | $form->addLabel('', '<span id="filepaths"><div id="filepath_1"></div></span>'); |
551 | 551 | $form->addLabel('', |
552 | 552 | '<span id="link-more-attach"> |
553 | - <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile') . '</span> |
|
553 | + <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile').'</span> |
|
554 | 554 | </span> |
555 | 555 | ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).') |
556 | 556 | '); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function __construct() |
17 | 17 | { |
18 | 18 | parent::__construct(); |
19 | - $this->table = Database::get_main_table(TABLE_GRADE_MODEL); |
|
19 | + $this->table = Database::get_main_table(TABLE_GRADE_MODEL); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | // action links |
57 | 57 | echo '<div class="actions" style="margin-bottom:20px">'; |
58 | - echo '<a href="grade_models.php">'.Display::return_icon('back.png',get_lang('Back'),'', ICON_SIZE_MEDIUM).'</a>'; |
|
58 | + echo '<a href="grade_models.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
59 | 59 | echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'), '', ICON_SIZE_MEDIUM).'</a>'; |
60 | 60 | echo '</div>'; |
61 | 61 | echo Display::grid_html('grade_model'); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $form->addElement('hidden', 'components['.$i.'][id]', null); |
130 | 130 | |
131 | 131 | $template_percentage = |
132 | - '<div id=' . $i . ' style="display: '.(($i<=$nr_items)?'inline':'none').';" class="form-group"> |
|
132 | + '<div id='.$i.' style="display: '.(($i <= $nr_items) ? 'inline' : 'none').';" class="form-group"> |
|
133 | 133 | <label for="" class="col-sm-2 control-label"> |
134 | 134 | {label} |
135 | 135 | </label> |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | |
144 | 144 | $template_title = |
145 | 145 | ' {element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error --> |
146 | - <a href="javascript:plusItem(' . ($counter+1) . ')"> |
|
147 | - '.Display::return_icon('add.png', get_lang('Add'), ['id' => 'plus-' . ($counter+1), 'style' => 'display: '.(($counter>=$nr_items) ? 'inline':'none') ]).' |
|
146 | + <a href="javascript:plusItem(' . ($counter + 1).')"> |
|
147 | + '.Display::return_icon('add.png', get_lang('Add'), ['id' => 'plus-'.($counter + 1), 'style' => 'display: '.(($counter >= $nr_items) ? 'inline' : 'none')]).' |
|
148 | 148 | </a> |
149 | - <a href="javascript:minItem(' . ($counter) . ')"> |
|
150 | - '.Display::return_icon('delete.png', get_lang('Delete'), ['id' => 'min-' . ($counter), 'style' => 'display: '.(($counter>=$nr_items) ? 'inline':'none') ]).' |
|
149 | + <a href="javascript:minItem(' . ($counter).')"> |
|
150 | + '.Display::return_icon('delete.png', get_lang('Delete'), ['id' => 'min-'.($counter), 'style' => 'display: '.(($counter >= $nr_items) ? 'inline' : 'none')]).' |
|
151 | 151 | </a> |
152 | 152 | </div></div>'; |
153 | 153 | $renderer->setElementTemplate($template_title, 'components['.$i.'][title]'); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $sql = "SELECT id, name, description, total_tickets |
79 | 79 | FROM $table"; |
80 | 80 | |
81 | - if (!in_array($direction, array('ASC','DESC'))) { |
|
81 | + if (!in_array($direction, array('ASC', 'DESC'))) { |
|
82 | 82 | $direction = 'ASC'; |
83 | 83 | } |
84 | 84 | $column = intval($column); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | public static function get_all_tickets_status() |
240 | 240 | { |
241 | 241 | $table_support_status = Database::get_main_table(TABLE_TICKET_STATUS); |
242 | - $sql = "SELECT * FROM " . $table_support_status; |
|
242 | + $sql = "SELECT * FROM ".$table_support_status; |
|
243 | 243 | $result = Database::query($sql); |
244 | 244 | $types = array(); |
245 | 245 | while ($row = Database::fetch_assoc($result)) { |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $ticket_id = Database::insert($table_support_tickets, $params); |
363 | 363 | |
364 | 364 | if ($ticket_id) { |
365 | - $ticket_code = "A" . str_pad($ticket_id, 11, '0', STR_PAD_LEFT); |
|
365 | + $ticket_code = "A".str_pad($ticket_id, 11, '0', STR_PAD_LEFT); |
|
366 | 366 | |
367 | 367 | Display::addFlash(Display::return_message( |
368 | 368 | sprintf( |
@@ -403,32 +403,32 @@ discard block |
||
403 | 403 | $helpDeskMessage = |
404 | 404 | '<table> |
405 | 405 | <tr> |
406 | - <td width="100px"><b>' . get_lang('User') . '</b></td> |
|
407 | - <td width="400px">' . $user['firstname']. ' ' . $user['lastname'] . '</td> |
|
406 | + <td width="100px"><b>' . get_lang('User').'</b></td> |
|
407 | + <td width="400px">' . $user['firstname'].' '.$user['lastname'].'</td> |
|
408 | 408 | </tr> |
409 | 409 | <tr> |
410 | - <td width="100px"><b>' . get_lang('Username') . '</b></td> |
|
411 | - <td width="400px">' . $user['username'] . '</td> |
|
410 | + <td width="100px"><b>' . get_lang('Username').'</b></td> |
|
411 | + <td width="400px">' . $user['username'].'</td> |
|
412 | 412 | </tr> |
413 | 413 | <tr> |
414 | - <td width="100px"><b>' . get_lang('Email') . '</b></td> |
|
415 | - <td width="400px">' . $user['email'] . '</td> |
|
414 | + <td width="100px"><b>' . get_lang('Email').'</b></td> |
|
415 | + <td width="400px">' . $user['email'].'</td> |
|
416 | 416 | </tr> |
417 | 417 | <tr> |
418 | - <td width="100px"><b>' . get_lang('Phone') . '</b></td> |
|
419 | - <td width="400px">' . $user['phone'] . '</td> |
|
418 | + <td width="100px"><b>' . get_lang('Phone').'</b></td> |
|
419 | + <td width="400px">' . $user['phone'].'</td> |
|
420 | 420 | </tr> |
421 | 421 | <tr> |
422 | - <td width="100px"><b>' . get_lang('Date') . '</b></td> |
|
423 | - <td width="400px">' . api_convert_and_format_date($now, DATE_TIME_FORMAT_LONG) . '</td> |
|
422 | + <td width="100px"><b>' . get_lang('Date').'</b></td> |
|
423 | + <td width="400px">' . api_convert_and_format_date($now, DATE_TIME_FORMAT_LONG).'</td> |
|
424 | 424 | </tr> |
425 | 425 | <tr> |
426 | - <td width="100px"><b>' . get_lang('Title') . '</b></td> |
|
427 | - <td width="400px">' . $subject . '</td> |
|
426 | + <td width="100px"><b>' . get_lang('Title').'</b></td> |
|
427 | + <td width="400px">' . $subject.'</td> |
|
428 | 428 | </tr> |
429 | 429 | <tr> |
430 | - <td width="100px"><b>' . get_lang('Description') . '</b></td> |
|
431 | - <td width="400px">' . $content . '</td> |
|
430 | + <td width="100px"><b>' . get_lang('Description').'</b></td> |
|
431 | + <td width="400px">' . $content.'</td> |
|
432 | 432 | </tr> |
433 | 433 | </table>'; |
434 | 434 | |
@@ -663,10 +663,10 @@ discard block |
||
663 | 663 | $table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET); |
664 | 664 | $table_support_message_attachments = Database::get_main_table(TABLE_TICKET_MESSAGE_ATTACHMENTS); |
665 | 665 | if ($sendConfirmation) { |
666 | - $form = '<form action="ticket_details.php?ticket_id=' . $ticket_id . '" id="confirmticket" method="POST" > |
|
667 | - <p>' . get_lang('TicketWasThisAnswerSatisfying') . '</p> |
|
668 | - <button class="btn btn-primary responseyes" name="response" id="responseyes" value="1">' . get_lang('Yes') . '</button> |
|
669 | - <button class="btn btn-danger responseno" name="response" id="responseno" value="0">' . get_lang('No') . '</button> |
|
666 | + $form = '<form action="ticket_details.php?ticket_id='.$ticket_id.'" id="confirmticket" method="POST" > |
|
667 | + <p>' . get_lang('TicketWasThisAnswerSatisfying').'</p> |
|
668 | + <button class="btn btn-primary responseyes" name="response" id="responseyes" value="1">' . get_lang('Yes').'</button> |
|
669 | + <button class="btn btn-danger responseno" name="response" id="responseno" value="0">' . get_lang('No').'</button> |
|
670 | 670 | </form>'; |
671 | 671 | $content .= $form; |
672 | 672 | } |
@@ -762,11 +762,11 @@ discard block |
||
762 | 762 | } else { |
763 | 763 | $new_file_name = uniqid(''); |
764 | 764 | $path_attachment = api_get_path(SYS_ARCHIVE_PATH); |
765 | - $path_message_attach = $path_attachment . 'plugin_ticket_messageattch/'; |
|
765 | + $path_message_attach = $path_attachment.'plugin_ticket_messageattch/'; |
|
766 | 766 | if (!file_exists($path_message_attach)) { |
767 | 767 | @mkdir($path_message_attach, api_get_permissions_for_new_directories(), true); |
768 | 768 | } |
769 | - $new_path = $path_message_attach . $new_file_name; |
|
769 | + $new_path = $path_message_attach.$new_file_name; |
|
770 | 770 | if (is_uploaded_file($file_attach['tmp_name'])) { |
771 | 771 | @copy($file_attach['tmp_name'], $new_path); |
772 | 772 | } |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | '$ticket_id', |
790 | 790 | '$message_id', |
791 | 791 | '$message_attch_id', |
792 | - '" . $file_attach['size'] . "', |
|
792 | + '".$file_attach['size']."', |
|
793 | 793 | '$user_id', |
794 | 794 | '$now', |
795 | 795 | '$user_id', |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | Database::query($sql); |
799 | 799 | |
800 | 800 | return array( |
801 | - 'path' => $path_message_attach . $safe_new_file_name, |
|
801 | + 'path' => $path_message_attach.$safe_new_file_name, |
|
802 | 802 | 'filename' => $safe_file_name, |
803 | 803 | ); |
804 | 804 | } |
@@ -971,23 +971,23 @@ discard block |
||
971 | 971 | $unread = Database::fetch_object($result_unread)->unread;*/ |
972 | 972 | |
973 | 973 | $userInfo = api_get_user_info($row['sys_insert_user_id']); |
974 | - $hrefUser = $webPath . 'main/admin/user_information.php?user_id=' . $userInfo['user_id']; |
|
974 | + $hrefUser = $webPath.'main/admin/user_information.php?user_id='.$userInfo['user_id']; |
|
975 | 975 | $name = "<a href='$hrefUser'> {$userInfo['username']} </a>"; |
976 | 976 | $actions = ''; |
977 | 977 | |
978 | 978 | if ($row['assigned_last_user'] != 0) { |
979 | 979 | $assignedUserInfo = api_get_user_info($row['assigned_last_user']); |
980 | 980 | if (!empty($assignedUserInfo)) { |
981 | - $hrefResp = $webPath . 'main/admin/user_information.php?user_id=' . $assignedUserInfo['user_id']; |
|
981 | + $hrefResp = $webPath.'main/admin/user_information.php?user_id='.$assignedUserInfo['user_id']; |
|
982 | 982 | $row['assigned_last_user'] = "<a href='$hrefResp'> {$assignedUserInfo['username']} </a>"; |
983 | 983 | } else { |
984 | 984 | $row['assigned_last_user'] = get_lang('UnknownUser'); |
985 | 985 | } |
986 | 986 | } else { |
987 | 987 | if ($row['status_id'] !== self::STATUS_FORWARDED) { |
988 | - $row['assigned_last_user'] = '<span style="color:#ff0000;">' . get_lang('ToBeAssigned') . '</span>'; |
|
988 | + $row['assigned_last_user'] = '<span style="color:#ff0000;">'.get_lang('ToBeAssigned').'</span>'; |
|
989 | 989 | } else { |
990 | - $row['assigned_last_user'] = '<span style="color:#00ff00;">' . get_lang('MessageResent') . '</span>'; |
|
990 | + $row['assigned_last_user'] = '<span style="color:#00ff00;">'.get_lang('MessageResent').'</span>'; |
|
991 | 991 | } |
992 | 992 | } |
993 | 993 | |
@@ -1016,13 +1016,13 @@ discard block |
||
1016 | 1016 | ); |
1017 | 1017 | if ($isAdmin) { |
1018 | 1018 | if ($row['priority_id'] === self::PRIORITY_HIGH && $row['status_id'] != self::STATUS_CLOSE) { |
1019 | - $actions .= '<img src="' . $webCodePath . 'img/exclamation.png" border="0" />'; |
|
1019 | + $actions .= '<img src="'.$webCodePath.'img/exclamation.png" border="0" />'; |
|
1020 | 1020 | } |
1021 | 1021 | $row['col0'] = Display::return_icon( |
1022 | 1022 | $img_source, |
1023 | 1023 | get_lang('Info') |
1024 | 1024 | ). |
1025 | - '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . $row['code'] . '</a>'; |
|
1025 | + '<a href="ticket_details.php?ticket_id='.$row['col0'].'">'.$row['code'].'</a>'; |
|
1026 | 1026 | // @todo fix |
1027 | 1027 | /*if ($row['col7'] == 'PENDIENTE') { |
1028 | 1028 | $row['col7'] = '<span style="color: #f00; font-weight:bold;">' . $row['col7'] . '</span>'; |
@@ -1043,17 +1043,17 @@ discard block |
||
1043 | 1043 | $row['col0'] = Display::return_icon( |
1044 | 1044 | $img_source, |
1045 | 1045 | get_lang('Info') |
1046 | - ) . '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . $row['code'] . '</a>'; |
|
1046 | + ).'<a href="ticket_details.php?ticket_id='.$row['col0'].'">'.$row['code'].'</a>'; |
|
1047 | 1047 | $now = api_strtotime(api_get_utc_datetime()); |
1048 | 1048 | $last_edit_date = api_strtotime($row['sys_lastedit_datetime']); |
1049 | 1049 | $dif = $now - $last_edit_date; |
1050 | 1050 | |
1051 | 1051 | if ($dif > 172800 && $row['priority_id'] === self::PRIORITY_NORMAL && $row['status_id'] != self::STATUS_CLOSE) { |
1052 | - $actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php?ticket_id=' . $row['ticket_id'] . '&action=alert"> |
|
1053 | - <img src="' . Display::returnIconPath('exclamation.png') . '" border="0" /></a>'; |
|
1052 | + $actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php?ticket_id='.$row['ticket_id'].'&action=alert"> |
|
1053 | + <img src="' . Display::returnIconPath('exclamation.png').'" border="0" /></a>'; |
|
1054 | 1054 | } |
1055 | 1055 | if ($row['priority_id'] === self::PRIORITY_HIGH) { |
1056 | - $actions .= '<img src="' . Display::returnIconPath('admin_star.png') . '" border="0" />'; |
|
1056 | + $actions .= '<img src="'.Display::returnIconPath('admin_star.png').'" border="0" />'; |
|
1057 | 1057 | } |
1058 | 1058 | $ticket = array( |
1059 | 1059 | $row['col0'], |
@@ -1069,9 +1069,9 @@ discard block |
||
1069 | 1069 | </a>'; |
1070 | 1070 | }*/ |
1071 | 1071 | if ($isAdmin) { |
1072 | - $ticket['0'] .= ' <a href="javascript:void(0)" onclick="load_history_ticket(\'div_' . $row['ticket_id'] . '\',' . $row['ticket_id'] . ')"> |
|
1073 | - <img onclick="load_course_list(\'div_' . $row['ticket_id'] . '\',' . $row['ticket_id'] . ')" onmouseover="clear_course_list (\'div_' . $row['ticket_id'] . '\')" src="' . Display::returnIconPath('history.gif') . '" title="' . get_lang('Historial') . '" alt="' . get_lang('Historial') . '"/> |
|
1074 | - <div class="blackboard_hide" id="div_' . $row['ticket_id'] . '"> </div> |
|
1072 | + $ticket['0'] .= ' <a href="javascript:void(0)" onclick="load_history_ticket(\'div_'.$row['ticket_id'].'\','.$row['ticket_id'].')"> |
|
1073 | + <img onclick="load_course_list(\'div_' . $row['ticket_id'].'\','.$row['ticket_id'].')" onmouseover="clear_course_list (\'div_'.$row['ticket_id'].'\')" src="'.Display::returnIconPath('history.gif').'" title="'.get_lang('Historial').'" alt="'.get_lang('Historial').'"/> |
|
1074 | + <div class="blackboard_hide" id="div_' . $row['ticket_id'].'"> </div> |
|
1075 | 1075 | </a> '; |
1076 | 1076 | } |
1077 | 1077 | $tickets[] = $ticket; |
@@ -1306,8 +1306,8 @@ discard block |
||
1306 | 1306 | } |
1307 | 1307 | |
1308 | 1308 | $userInfo = api_get_user_info($row['sys_insert_user_id']); |
1309 | - $row['user_url'] = '<a href="' . api_get_path(WEB_PATH) . 'main/admin/user_information.php?user_id=' . $userInfo['user_id'] . '"> |
|
1310 | - ' . $userInfo['complete_name']. '</a>'; |
|
1309 | + $row['user_url'] = '<a href="'.api_get_path(WEB_PATH).'main/admin/user_information.php?user_id='.$userInfo['user_id'].'"> |
|
1310 | + ' . $userInfo['complete_name'].'</a>'; |
|
1311 | 1311 | $ticket['usuario'] = $userInfo; |
1312 | 1312 | $ticket['ticket'] = $row; |
1313 | 1313 | } |
@@ -1324,10 +1324,10 @@ discard block |
||
1324 | 1324 | while ($row = Database::fetch_assoc($result)) { |
1325 | 1325 | $message = $row; |
1326 | 1326 | $completeName = api_get_person_name($row['firstname'], $row['lastname']); |
1327 | - $href = $webPath . 'main/admin/user_information.php?user_id=' . $row['user_id']; |
|
1327 | + $href = $webPath.'main/admin/user_information.php?user_id='.$row['user_id']; |
|
1328 | 1328 | // Check if user is an admin |
1329 | 1329 | $sql_admin = "SELECT user_id FROM $admin_table |
1330 | - WHERE user_id = '" . intval($message['user_id']) . "' |
|
1330 | + WHERE user_id = '".intval($message['user_id'])."' |
|
1331 | 1331 | LIMIT 1"; |
1332 | 1332 | $result_admin = Database::query($sql_admin); |
1333 | 1333 | $message['admin'] = false; |
@@ -1339,12 +1339,12 @@ discard block |
||
1339 | 1339 | $sql = "SELECT * |
1340 | 1340 | FROM $table_support_message_attachments |
1341 | 1341 | WHERE |
1342 | - message_id = " . $row['id'] . " AND |
|
1342 | + message_id = ".$row['id']." AND |
|
1343 | 1343 | ticket_id = '$ticket_id' "; |
1344 | 1344 | $result_attach = Database::query($sql); |
1345 | 1345 | while ($row2 = Database::fetch_assoc($result_attach)) { |
1346 | - $archiveURL = $archiveURL = $webPath . "plugin/" . PLUGIN_NAME . '/src/download.php?ticket_id=' . $ticket_id . '&file='; |
|
1347 | - $row2['attachment_link'] = $attach_icon . ' <a href="' . $archiveURL . $row2['path'] . '&title=' . $row2['filename'] . '">' . $row2['filename'] . '</a> (' . $row2['size'] . ')'; |
|
1346 | + $archiveURL = $archiveURL = $webPath."plugin/".PLUGIN_NAME.'/src/download.php?ticket_id='.$ticket_id.'&file='; |
|
1347 | + $row2['attachment_link'] = $attach_icon.' <a href="'.$archiveURL.$row2['path'].'&title='.$row2['filename'].'">'.$row2['filename'].'</a> ('.$row2['size'].')'; |
|
1348 | 1348 | $message['attachments'][] = $row2; |
1349 | 1349 | } |
1350 | 1350 | $ticket['messages'][] = $message; |
@@ -1371,8 +1371,8 @@ discard block |
||
1371 | 1371 | $sql = "UPDATE $table_support_messages |
1372 | 1372 | SET |
1373 | 1373 | status = 'LEI', |
1374 | - sys_lastedit_user_id ='" . api_get_user_id() . "', |
|
1375 | - sys_lastedit_datetime ='" . $now . "' |
|
1374 | + sys_lastedit_user_id ='".api_get_user_id()."', |
|
1375 | + sys_lastedit_datetime ='" . $now."' |
|
1376 | 1376 | WHERE ticket_id ='$ticket_id' "; |
1377 | 1377 | |
1378 | 1378 | if (api_is_platform_admin()) { |
@@ -1495,7 +1495,7 @@ discard block |
||
1495 | 1495 | SET |
1496 | 1496 | status_id = '$status_id', |
1497 | 1497 | sys_lastedit_user_id ='$user_id', |
1498 | - sys_lastedit_datetime ='" . $now . "' |
|
1498 | + sys_lastedit_datetime ='".$now."' |
|
1499 | 1499 | WHERE id ='$ticket_id'"; |
1500 | 1500 | $result = Database::query($sql); |
1501 | 1501 | |
@@ -1581,7 +1581,7 @@ discard block |
||
1581 | 1581 | $sql = "UPDATE $table_support_tickets SET |
1582 | 1582 | status_id = '".self::STATUS_CLOSE."', |
1583 | 1583 | sys_lastedit_user_id ='$user_id', |
1584 | - sys_lastedit_datetime ='" . $now . "', |
|
1584 | + sys_lastedit_datetime ='".$now."', |
|
1585 | 1585 | end_date ='$now' |
1586 | 1586 | WHERE id ='$ticket_id'"; |
1587 | 1587 | Database::query($sql); |
@@ -1635,15 +1635,15 @@ discard block |
||
1635 | 1635 | |
1636 | 1636 | if ($row['user_id'] != 0) { |
1637 | 1637 | $assignuser = api_get_user_info($row['user_id']); |
1638 | - $row['assignuser'] = '<a href="' . $webpath . 'main/admin/user_information.php?user_id=' . $row['user_id'] . '" target="_blank">' . |
|
1639 | - $assignuser['username'] . '</a>'; |
|
1638 | + $row['assignuser'] = '<a href="'.$webpath.'main/admin/user_information.php?user_id='.$row['user_id'].'" target="_blank">'. |
|
1639 | + $assignuser['username'].'</a>'; |
|
1640 | 1640 | } else { |
1641 | 1641 | $row['assignuser'] = get_lang('Unassign'); |
1642 | 1642 | } |
1643 | 1643 | $row['assigned_date'] = date_to_str_ago($row['assigned_date']); |
1644 | 1644 | $insertuser = api_get_user_info($row['sys_insert_user_id']); |
1645 | - $row['insertuser'] = '<a href="' . $webpath . 'main/admin/user_information.php?user_id=' . $row['sys_insert_user_id'] . '" target="_blank">' . |
|
1646 | - $insertuser['username'] . '</a>'; |
|
1645 | + $row['insertuser'] = '<a href="'.$webpath.'main/admin/user_information.php?user_id='.$row['sys_insert_user_id'].'" target="_blank">'. |
|
1646 | + $insertuser['username'].'</a>'; |
|
1647 | 1647 | $history[] = $row; |
1648 | 1648 | } |
1649 | 1649 | |
@@ -1843,7 +1843,7 @@ discard block |
||
1843 | 1843 | while ($row = Database::fetch_assoc($result)) { |
1844 | 1844 | if ($row['responsable'] != 0) { |
1845 | 1845 | $row['responsable'] = api_get_user_info($row['responsable']); |
1846 | - $row['responsable'] = $row['responsable']['firstname'] . ' ' . $row['responsable']['lastname']; |
|
1846 | + $row['responsable'] = $row['responsable']['firstname'].' '.$row['responsable']['lastname']; |
|
1847 | 1847 | } |
1848 | 1848 | $row['sys_insert_datetime'] = api_format_date( |
1849 | 1849 | $row['sys_insert_datetime'], '%d/%m/%y - %I:%M:%S %p' |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | return "<script> |
30 | 30 | function confirmation (name) |
31 | 31 | { |
32 | - if (confirm(\" " . get_lang("NoteConfirmDelete") . " \"+ name + \" ?\")) |
|
32 | + if (confirm(\" " . get_lang("NoteConfirmDelete")." \"+ name + \" ?\")) |
|
33 | 33 | {return true;} |
34 | 34 | else |
35 | 35 | {return false;} |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | description AS note_comment, |
107 | 107 | session_id AS session_id |
108 | 108 | FROM $t_notebook |
109 | - WHERE c_id = $course_id AND notebook_id = '" . intval($notebook_id) . "' "; |
|
109 | + WHERE c_id = $course_id AND notebook_id = '".intval($notebook_id)."' "; |
|
110 | 110 | $result = Database::query($sql); |
111 | 111 | if (Database::num_rows($result) != 1) { |
112 | 112 | return array(); |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | $sql = "DELETE FROM $t_notebook |
185 | 185 | WHERE |
186 | 186 | c_id = $course_id AND |
187 | - notebook_id='" . intval($notebook_id) . "' AND |
|
188 | - user_id = '" . api_get_user_id() . "'"; |
|
187 | + notebook_id='".intval($notebook_id)."' AND |
|
188 | + user_id = '" . api_get_user_id()."'"; |
|
189 | 189 | $result = Database::query($sql); |
190 | 190 | $affected_rows = Database::affected_rows($result); |
191 | 191 | if ($affected_rows != 1) { |
@@ -223,22 +223,22 @@ discard block |
||
223 | 223 | echo '<div class="actions">'; |
224 | 224 | if (!api_is_anonymous()) { |
225 | 225 | if (api_get_session_id() == 0) |
226 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
227 | - Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
|
226 | + echo '<a href="index.php?'.api_get_cidreq().'&action=addnote">'. |
|
227 | + Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32').'</a>'; |
|
228 | 228 | elseif (api_is_allowed_to_session_edit(false, true)) { |
229 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
230 | - Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
|
229 | + echo '<a href="index.php?'.api_get_cidreq().'&action=addnote">'. |
|
230 | + Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32').'</a>'; |
|
231 | 231 | } |
232 | 232 | } else { |
233 | - echo '<a href="javascript:void(0)">' . Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
|
233 | + echo '<a href="javascript:void(0)">'.Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32').'</a>'; |
|
234 | 234 | } |
235 | 235 | |
236 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=creation_date&direction=' . $link_sort_direction . '">' . |
|
237 | - Display::return_icon('notes_order_by_date_new.png', get_lang('OrderByCreationDate'), '', '32') . '</a>'; |
|
238 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=update_date&direction=' . $link_sort_direction . '">' . |
|
239 | - Display::return_icon('notes_order_by_date_mod.png', get_lang('OrderByModificationDate'), '', '32') . '</a>'; |
|
240 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=title&direction=' . $link_sort_direction . '">' . |
|
241 | - Display::return_icon('notes_order_by_title.png', get_lang('OrderByTitle'), '', '32') . '</a>'; |
|
236 | + echo '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=creation_date&direction='.$link_sort_direction.'">'. |
|
237 | + Display::return_icon('notes_order_by_date_new.png', get_lang('OrderByCreationDate'), '', '32').'</a>'; |
|
238 | + echo '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=update_date&direction='.$link_sort_direction.'">'. |
|
239 | + Display::return_icon('notes_order_by_date_mod.png', get_lang('OrderByModificationDate'), '', '32').'</a>'; |
|
240 | + echo '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=title&direction='.$link_sort_direction.'">'. |
|
241 | + Display::return_icon('notes_order_by_title.png', get_lang('OrderByTitle'), '', '32').'</a>'; |
|
242 | 242 | echo '</div>'; |
243 | 243 | |
244 | 244 | if (!isset($_SESSION['notebook_view']) || !in_array($_SESSION['notebook_view'], array('creation_date', 'update_date', 'title'))) { |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | // Database table definition |
249 | 249 | $t_notebook = Database :: get_course_table(TABLE_NOTEBOOK); |
250 | 250 | if ($_SESSION['notebook_view'] == 'creation_date' || $_SESSION['notebook_view'] == 'update_date') { |
251 | - $order_by = " ORDER BY " . $_SESSION['notebook_view'] . " $sort_direction "; |
|
251 | + $order_by = " ORDER BY ".$_SESSION['notebook_view']." $sort_direction "; |
|
252 | 252 | } else { |
253 | - $order_by = " ORDER BY " . $_SESSION['notebook_view'] . " $sort_direction "; |
|
253 | + $order_by = " ORDER BY ".$_SESSION['notebook_view']." $sort_direction "; |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | //condition for the session |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $sql = "SELECT * FROM $t_notebook |
264 | 264 | WHERE |
265 | 265 | c_id = $course_id AND |
266 | - user_id = '" . api_get_user_id() . "' |
|
266 | + user_id = '".api_get_user_id()."' |
|
267 | 267 | $condition_session |
268 | 268 | $cond_extra $order_by |
269 | 269 | "; |
@@ -273,18 +273,18 @@ discard block |
||
273 | 273 | $session_img = api_get_session_image($row['session_id'], $_user['status']); |
274 | 274 | $updateValue = ''; |
275 | 275 | if ($row['update_date'] <> $row['creation_date']) { |
276 | - $updateValue = ', ' . get_lang('UpdateDate') . ': ' . Display::dateToStringAgoAndLongDate($row['update_date']); |
|
276 | + $updateValue = ', '.get_lang('UpdateDate').': '.Display::dateToStringAgoAndLongDate($row['update_date']); |
|
277 | 277 | } |
278 | 278 | |
279 | - $actions = '<a href="' . api_get_self() . '?action=editnote¬ebook_id=' . $row['notebook_id'] . '">' . |
|
280 | - Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>'; |
|
281 | - $actions .= '<a href="' . api_get_self() . '?action=deletenote¬ebook_id=' . $row['notebook_id'] . '" onclick="return confirmation(\'' . $row['title'] . '\');">' . |
|
282 | - Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>'; |
|
279 | + $actions = '<a href="'.api_get_self().'?action=editnote¬ebook_id='.$row['notebook_id'].'">'. |
|
280 | + Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'; |
|
281 | + $actions .= '<a href="'.api_get_self().'?action=deletenote¬ebook_id='.$row['notebook_id'].'" onclick="return confirmation(\''.$row['title'].'\');">'. |
|
282 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
283 | 283 | |
284 | 284 | echo Display::panel( |
285 | 285 | $row['description'], |
286 | - $row['title'] . $session_img.' <div class="pull-right">'.$actions.'</div>', |
|
287 | - get_lang('CreationDate') . ': ' . Display::dateToStringAgoAndLongDate($row['creation_date']). $updateValue |
|
286 | + $row['title'].$session_img.' <div class="pull-right">'.$actions.'</div>', |
|
287 | + get_lang('CreationDate').': '.Display::dateToStringAgoAndLongDate($row['creation_date']).$updateValue |
|
288 | 288 | ); |
289 | 289 | } |
290 | 290 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | // Creating new name |
205 | 205 | $name = md5($this->user_id.$this->certificate_data['cat_id']).'.html'; |
206 | 206 | $my_path_certificate = $this->certification_user_path.$name; |
207 | - $path_certificate ='/'.$name; |
|
207 | + $path_certificate = '/'.$name; |
|
208 | 208 | |
209 | 209 | //Getting QR filename |
210 | 210 | $file_info = pathinfo($path_certificate); |
@@ -350,11 +350,11 @@ discard block |
||
350 | 350 | $final_content['gradebook_institution'].' - '. |
351 | 351 | $final_content['gradebook_sitename'].' - '. |
352 | 352 | get_lang('Certification').$break_space. |
353 | - get_lang('Student'). ': '.$final_content['user_firstname'].' '.$final_content['user_lastname'].$break_space. |
|
354 | - get_lang('Teacher'). ': '.$final_content['teacher_firstname'].' '.$final_content['teacher_lastname'].$break_space. |
|
355 | - get_lang('Date'). ': '.$final_content['date_certificate'].$break_space. |
|
356 | - get_lang('Score'). ': '.$final_content['gradebook_grade'].$break_space. |
|
357 | - 'URL'. ': '.$final_content['certificate_link']; |
|
353 | + get_lang('Student').': '.$final_content['user_firstname'].' '.$final_content['user_lastname'].$break_space. |
|
354 | + get_lang('Teacher').': '.$final_content['teacher_firstname'].' '.$final_content['teacher_lastname'].$break_space. |
|
355 | + get_lang('Date').': '.$final_content['date_certificate'].$break_space. |
|
356 | + get_lang('Score').': '.$final_content['gradebook_grade'].$break_space. |
|
357 | + 'URL'.': '.$final_content['certificate_link']; |
|
358 | 358 | |
359 | 359 | return $text; |
360 | 360 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | return false; |
408 | 408 | } |
409 | 409 | |
410 | - $user_certificate = $this->certification_user_path . basename($this->certificate_data['path_certificate']); |
|
410 | + $user_certificate = $this->certification_user_path.basename($this->certificate_data['path_certificate']); |
|
411 | 411 | |
412 | 412 | if (!file_exists($user_certificate)) { |
413 | 413 | return false; |
@@ -421,9 +421,9 @@ discard block |
||
421 | 421 | */ |
422 | 422 | public function show() |
423 | 423 | { |
424 | - header('Content-Type: text/html; charset='. api_get_system_encoding()); |
|
424 | + header('Content-Type: text/html; charset='.api_get_system_encoding()); |
|
425 | 425 | |
426 | - $user_certificate = $this->certification_user_path . basename($this->certificate_data['path_certificate']); |
|
426 | + $user_certificate = $this->certification_user_path.basename($this->certificate_data['path_certificate']); |
|
427 | 427 | $certificateContent = file_get_contents($user_certificate); |
428 | 428 | |
429 | 429 | $certificate = new DOMDocument(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'tr', |
69 | 69 | Display::tag( |
70 | 70 | 'td', |
71 | - get_lang('CheckFilePermissions') . ' ' . Security::remove_XSS($plugin_info_file), |
|
71 | + get_lang('CheckFilePermissions').' '.Security::remove_XSS($plugin_info_file), |
|
72 | 72 | array('colspan' => '3') |
73 | 73 | ) |
74 | 74 | ); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | foreach ($disabled_blocks_data as $disabled_block) { |
82 | 82 | echo '<tr style="background-color:#eee">'; |
83 | 83 | echo '<td><center><input type="checkbox" name="disabled_block" value="true" checked disabled /></center>'; |
84 | - for ($j = 0 ; $j < count($table_cols); $j++) { |
|
84 | + for ($j = 0; $j < count($table_cols); $j++) { |
|
85 | 85 | if (isset($disabled_block[strtolower($table_cols[$j])])) { |
86 | 86 | if ($j == 2) { |
87 | 87 | echo '<td>'; |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | // clean from block data |
193 | 193 | if (!empty($not_selected_blocks_id)) { |
194 | 194 | $sql_check = "SELECT id FROM $tbl_block |
195 | - WHERE id IN(".implode(',',$not_selected_blocks_id).")"; |
|
195 | + WHERE id IN(".implode(',', $not_selected_blocks_id).")"; |
|
196 | 196 | $rs_check = Database::query($sql_check); |
197 | 197 | if (Database::num_rows($rs_check) > 0) { |
198 | - $del = "DELETE FROM $tbl_block WHERE id IN(".implode(',',$not_selected_blocks_id).")"; |
|
198 | + $del = "DELETE FROM $tbl_block WHERE id IN(".implode(',', $not_selected_blocks_id).")"; |
|
199 | 199 | Database::query($del); |
200 | 200 | } |
201 | 201 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $affected_rows = Database::affected_rows($result); |
216 | 216 | } else { |
217 | 217 | // insert |
218 | - $plugin_info_file = $dashboard_pluginpath . $testplugin . "/$testplugin.info"; |
|
218 | + $plugin_info_file = $dashboard_pluginpath.$testplugin."/$testplugin.info"; |
|
219 | 219 | $plugin_info = array(); |
220 | 220 | if (file_exists($plugin_info_file)) { |
221 | 221 | $plugin_info = api_parse_info_file($plugin_info_file); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | // We check if plugin exists inside directory for updating active field |
286 | 286 | $sql = "SELECT * FROM $tbl_block"; |
287 | 287 | $rs = Database::query($sql); |
288 | - if (Database::num_rows($rs) > 0){ |
|
288 | + if (Database::num_rows($rs) > 0) { |
|
289 | 289 | while ($row = Database::fetch_array($rs)) { |
290 | 290 | if (!in_array($row['path'], $possibleplugins)) { |
291 | 291 | $active = 0; |
@@ -393,13 +393,13 @@ discard block |
||
393 | 393 | echo '<td>'.$block['description'].'</td>'; |
394 | 394 | echo '<td> |
395 | 395 | <select class="selectpicker show-tick form-control" name="columns['.$block['id'].']"> |
396 | - <option value="1" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column']==1?'selected':'').' >1</option> |
|
397 | - <option value="2" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column']==2?'selected':'').' >2</option> |
|
396 | + <option value="1" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column'] == 1 ? 'selected' : '').' >1</option> |
|
397 | + <option value="2" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column'] == 2 ? 'selected' : '').' >2</option> |
|
398 | 398 | </select> |
399 | 399 | </td>'; |
400 | 400 | echo '</tr>'; |
401 | 401 | } else { |
402 | - echo Display::tag('tr', Display::tag('td', get_lang('Error').' '.$controller_class, array('colspan'=>'3'))); |
|
402 | + echo Display::tag('tr', Display::tag('td', get_lang('Error').' '.$controller_class, array('colspan'=>'3'))); |
|
403 | 403 | } |
404 | 404 | } |
405 | 405 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | */ |
450 | 450 | public static function store_user_blocks($user_id, $enabled_blocks, $columns) |
451 | 451 | { |
452 | - $selected_blocks_id = array(); |
|
452 | + $selected_blocks_id = array(); |
|
453 | 453 | if (is_array($enabled_blocks) && count($enabled_blocks) > 0) { |
454 | 454 | $selected_blocks_id = array_keys($enabled_blocks); |
455 | 455 | } |