@@ -16,15 +16,15 @@ |
||
16 | 16 | |
17 | 17 | public function onListMessages(MessageListEvent $event) { |
18 | 18 | |
19 | - foreach($this->getMessages() as $msg) { |
|
19 | + foreach ($this->getMessages() as $msg) { |
|
20 | 20 | $event->addMessage($msg); |
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | 24 | protected function getMessages() { |
25 | 25 | return array( |
26 | - new MessageModel(new UserModel('Karl kettenkit'),'Dude! do something!', new \DateTime('-3 days')), |
|
27 | - new MessageModel(new UserModel('Jack Trockendoc'),'This is some subject', new \DateTime('-10 month')), |
|
26 | + new MessageModel(new UserModel('Karl kettenkit'), 'Dude! do something!', new \DateTime('-3 days')), |
|
27 | + new MessageModel(new UserModel('Jack Trockendoc'), 'This is some subject', new \DateTime('-10 month')), |
|
28 | 28 | ); |
29 | 29 | } |
30 | 30 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | public function onListNotifications(NotificationListEvent $event) { |
18 | 18 | |
19 | - foreach($this->getNotifications() as $notify){ |
|
19 | + foreach ($this->getNotifications() as $notify) { |
|
20 | 20 | $event->addNotification($notify); |
21 | 21 | } |
22 | 22 |
@@ -45,12 +45,12 @@ |
||
45 | 45 | |
46 | 46 | protected function activateByRoute($route, $items) { |
47 | 47 | |
48 | - foreach($items as $item) { /** @var $item MenuItemModel */ |
|
49 | - if($item->hasChildren()) { |
|
48 | + foreach ($items as $item) { /** @var $item MenuItemModel */ |
|
49 | + if ($item->hasChildren()) { |
|
50 | 50 | $this->activateByRoute($route, $item->getChildren()); |
51 | 51 | } |
52 | 52 | else { |
53 | - if($item->getRoute() == $route) { |
|
53 | + if ($item->getRoute() == $route) { |
|
54 | 54 | $item->setIsActive(true); |
55 | 55 | } |
56 | 56 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $loader = new Loader\YamlFileLoader( |
24 | 24 | $container, |
25 | - new FileLocator(__DIR__ . '/../Resources/config') |
|
25 | + new FileLocator(__DIR__.'/../Resources/config') |
|
26 | 26 | ); |
27 | 27 | |
28 | 28 | $loader->load('services.yml'); |
@@ -222,14 +222,14 @@ |
||
222 | 222 | return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_BIG, null, true); |
223 | 223 | } |
224 | 224 | |
225 | - return api_get_path(WEB_UPLOAD_PATH) . 'badges/' . sha1($this->name) . '-small.png'; |
|
225 | + return api_get_path(WEB_UPLOAD_PATH).'badges/'.sha1($this->name).'-small.png'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | if (empty($this->icon)) { |
229 | 229 | return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_HUGE, null, true); |
230 | 230 | } |
231 | 231 | |
232 | - return api_get_path(WEB_UPLOAD_PATH) . "badges/{$this->icon}"; |
|
232 | + return api_get_path(WEB_UPLOAD_PATH)."badges/{$this->icon}"; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | // We are sure that the extra field exists. |
216 | 216 | foreach ($extra_fields as $extras) { |
217 | 217 | if (isset($user[$extras[1]])) { |
218 | - $key = $extras[1]; |
|
219 | - $value = $user[$extras[1]]; |
|
218 | + $key = $extras[1]; |
|
219 | + $value = $user[$extras[1]]; |
|
220 | 220 | UserManager::update_extra_field_value($user_id, $key, $value); |
221 | 221 | } |
222 | 222 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | global $current_tag; |
254 | 254 | switch ($data) { |
255 | 255 | case 'Contact': |
256 | - $user = array (); |
|
256 | + $user = array(); |
|
257 | 257 | break; |
258 | 258 | default: |
259 | 259 | $current_tag = $data; |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | |
351 | 351 | if (in_array($ext_import_file, $allowed_file_mimetype)) { |
352 | 352 | if (strcmp($file_type, 'csv') === 0 && $ext_import_file == $allowed_file_mimetype[0]) { |
353 | - $users = parse_csv_data($_FILES['import_file']['tmp_name']); |
|
353 | + $users = parse_csv_data($_FILES['import_file']['tmp_name']); |
|
354 | 354 | $errors = validate_data($users); |
355 | 355 | $error_kind_file = false; |
356 | 356 | } elseif (strcmp($file_type, 'xml') === 0 && $ext_import_file == $allowed_file_mimetype[1]) { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $isDRH = api_is_drh(); |
13 | 13 | |
14 | 14 | if (!$isStudent && !$isStudentBoss && !$isDRH) { |
15 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/skills_wheel.php'); |
|
15 | + header('Location: '.api_get_path(WEB_CODE_PATH).'social/skills_wheel.php'); |
|
16 | 16 | exit; |
17 | 17 | } |
18 | 18 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $result = Database::query($sql); |
34 | 34 | |
35 | 35 | if (Database::num_rows($result)) { |
36 | - $files = Database::store_result($result); |
|
36 | + $files = Database::store_result($result); |
|
37 | 37 | $rows = array(); |
38 | 38 | foreach ($files as $file) { |
39 | 39 | //Check if I have this file: |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | exit; |
20 | 20 | } |
21 | 21 | |
22 | -$interbreadcrumb[] = array ("url" => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
22 | +$interbreadcrumb[] = array("url" => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
23 | 23 | $tool_name = get_lang('MultipleAccessURLs'); |
24 | 24 | Display :: display_header($tool_name); |
25 | 25 | |
@@ -55,12 +55,12 @@ discard block |
||
55 | 55 | case 'register': |
56 | 56 | // we are going to register the admin |
57 | 57 | if (api_is_platform_admin()) { |
58 | - if ($current_access_url_id!=-1) { |
|
58 | + if ($current_access_url_id != -1) { |
|
59 | 59 | $url_str = ''; |
60 | 60 | foreach ($url_list as $my_url) { |
61 | 61 | if (!in_array($my_url['id'], $my_user_url_list)) { |
62 | 62 | UrlManager::add_user_to_url(api_get_user_id(), $my_url['id']); |
63 | - $url_str.=$my_url['url'].' <br />'; |
|
63 | + $url_str .= $my_url['url'].' <br />'; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | Display:: display_normal_message( |
@@ -84,16 +84,16 @@ discard block |
||
84 | 84 | $url_string .= $my_url['url'].' <br />'; |
85 | 85 | } |
86 | 86 | } |
87 | -if(!empty($url_string)) { |
|
88 | - Display :: display_warning_message(get_lang('AdminShouldBeRegisterInSite').'<br />'.$url_string,false); |
|
87 | +if (!empty($url_string)) { |
|
88 | + Display :: display_warning_message(get_lang('AdminShouldBeRegisterInSite').'<br />'.$url_string, false); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | // checking the current installation |
92 | -if ($current_access_url_id==-1) { |
|
92 | +if ($current_access_url_id == -1) { |
|
93 | 93 | Display::display_warning_message(get_lang('URLNotConfiguredPleaseChangedTo').': '.api_get_path(WEB_PATH)); |
94 | -} elseif(api_is_platform_admin()) { |
|
95 | - $quant= UrlManager::relation_url_user_exist(api_get_user_id(),$current_access_url_id); |
|
96 | - if ($quant==0) { |
|
94 | +} elseif (api_is_platform_admin()) { |
|
95 | + $quant = UrlManager::relation_url_user_exist(api_get_user_id(), $current_access_url_id); |
|
96 | + if ($quant == 0) { |
|
97 | 97 | Display:: display_warning_message( |
98 | 98 | '<a href="'.api_get_self().'?action=register&sec_token='.$parameters['sec_token'].'">'.get_lang('ClickToRegisterAdmin').'</a>', |
99 | 99 | false |
@@ -142,16 +142,16 @@ discard block |
||
142 | 142 | |
143 | 143 | //Status |
144 | 144 | $active = $row['active']; |
145 | - if ($active=='1') { |
|
146 | - $action='lock'; |
|
147 | - $image='right'; |
|
145 | + if ($active == '1') { |
|
146 | + $action = 'lock'; |
|
147 | + $image = 'right'; |
|
148 | 148 | } |
149 | - if ($active=='0') { |
|
150 | - $action='unlock'; |
|
151 | - $image='wrong'; |
|
149 | + if ($active == '0') { |
|
150 | + $action = 'unlock'; |
|
151 | + $image = 'wrong'; |
|
152 | 152 | } |
153 | 153 | // you cannot lock the default |
154 | - if ($row['id']=='1') { |
|
154 | + if ($row['id'] == '1') { |
|
155 | 155 | $status = Display::return_icon($image.'.gif', get_lang(ucfirst($action))); |
156 | 156 | } else { |
157 | 157 | $status = '<a href="access_urls.php?action='.$action.'&url_id='.$row['id'].'">'. |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $url_id = $row['id']; |
162 | 162 | $actions = Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), "access_url_edit.php?url_id=$url_id"); |
163 | 163 | if ($url_id != '1') { |
164 | - $actions .= '<a href="access_urls.php?action=delete_url&url_id='.$url_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'. |
|
164 | + $actions .= '<a href="access_urls.php?action=delete_url&url_id='.$url_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset))."'".')) return false;">'. |
|
165 | 165 | Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>'; |
166 | 166 | } |
167 | 167 | $urls[] = array($url, $description, $status, $actions); |