@@ -28,11 +28,11 @@ |
||
28 | 28 | { |
29 | 29 | $request = $event->getRequest(); |
30 | 30 | $uri = $request->getPathInfo(); |
31 | - if(!preg_match('!'.$this->indicator.'!', $uri)) { |
|
31 | + if (!preg_match('!'.$this->indicator.'!', $uri)) { |
|
32 | 32 | return; |
33 | 33 | } |
34 | 34 | |
35 | - if(false == ($user = $this->getUser())){ |
|
35 | + if (false == ($user = $this->getUser())) { |
|
36 | 36 | return; |
37 | 37 | } |
38 | 38 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | public function getUser() |
42 | 42 | { |
43 | 43 | if (!$this->container->has('security.context')) { |
44 | - return false; |
|
44 | + return false; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if (null === $token = $this->container->get('security.context')->getToken()) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public function onListTasks(TaskListEvent $event) |
18 | 18 | { |
19 | 19 | |
20 | - foreach($this->getTasks() as $task) { |
|
20 | + foreach ($this->getTasks() as $task) { |
|
21 | 21 | $event->addTask($task); |
22 | 22 | } |
23 | 23 |
@@ -26,9 +26,9 @@ |
||
26 | 26 | protected function getTasks() |
27 | 27 | { |
28 | 28 | return array( |
29 | - new TaskModel('make stuff', 30, TaskModel::COLOR_GREEN), |
|
30 | - new TaskModel('make more stuff', 60), |
|
31 | - new TaskModel('some more tasks to do', 10, TaskModel::COLOR_RED) |
|
29 | + new TaskModel('make stuff', 30, TaskModel::COLOR_GREEN), |
|
30 | + new TaskModel('make more stuff', 60), |
|
31 | + new TaskModel('some more tasks to do', 10, TaskModel::COLOR_RED) |
|
32 | 32 | ); |
33 | 33 | |
34 | 34 | } |
@@ -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 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | ->add('users', 'sonata_type_collection', array( |
29 | 29 | 'cascade_validation' => true, |
30 | 30 | ), array( |
31 | - // 'allow_delete' => true, |
|
31 | + // 'allow_delete' => true, |
|
32 | 32 | 'by_reference' => false, |
33 | 33 | 'edit' => 'inline', |
34 | 34 | 'inline' => 'table', |
@@ -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 | /** |
@@ -25,10 +25,10 @@ |
||
25 | 25 | { |
26 | 26 | |
27 | 27 | /** |
28 | - * @param string $keyword |
|
28 | + * @param string $keyword |
|
29 | 29 | * |
30 | - * @return mixed |
|
31 | - */ |
|
30 | + * @return mixed |
|
31 | + */ |
|
32 | 32 | public function searchUserByKeyword($keyword) |
33 | 33 | { |
34 | 34 | $qb = $this->createQueryBuilder('a'); |
@@ -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]) { |
@@ -454,7 +454,10 @@ |
||
454 | 454 | <blockquote> |
455 | 455 | <pre> |
456 | 456 | <b>UserName</b>;LastName;FirstName;Email;NewUserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;Active;Language;Courses;ClassId; |
457 | - xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br /> |
|
457 | + xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) { |
|
458 | + echo implode(';', $list_reponse).';'; |
|
459 | +} |
|
460 | +?></span>xxx1|xxx2|xxx3;1;<br /> |
|
458 | 461 | </pre> |
459 | 462 | </blockquote> |
460 | 463 | <p><?php |
@@ -60,8 +60,8 @@ |
||
60 | 60 | $user['error'] = get_lang('UserNameNotAvailable'); |
61 | 61 | $errors[] = $user; |
62 | 62 | } |
63 | - } |
|
64 | - } |
|
63 | + } |
|
64 | + } |
|
65 | 65 | |
66 | 66 | // 3. Check status. |
67 | 67 | if (isset($user['Status']) && !api_status_exists($user['Status'])) { |