@@ -541,7 +541,7 @@ |
||
541 | 541 | $form->addElement( |
542 | 542 | 'checkbox', |
543 | 543 | 'confirmation', |
544 | - null, |
|
544 | + null, |
|
545 | 545 | get_lang('RequestConfirmation') |
546 | 546 | ); |
547 | 547 | } |
@@ -453,7 +453,7 @@ |
||
453 | 453 | $date = '-'; |
454 | 454 | } |
455 | 455 | |
456 | - //Checking LP publicated and expired_on dates |
|
456 | + //Checking LP publicated and expired_on dates |
|
457 | 457 | if (!empty($lp_item['publicated_on'])) { |
458 | 458 | if ($now < api_strtotime($lp_item['publicated_on'], 'UTC')) { |
459 | 459 | continue; |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $array_to_search = is_array($docs_and_folders) ? $docs_and_folders : array(); |
36 | 36 | |
37 | 37 | if (count($array_to_search) > 0) { |
38 | - while (list($key) = each($array_to_search)) { |
|
39 | - $all_files[] = basename($array_to_search[$key]['path']); |
|
40 | - } |
|
38 | + while (list($key) = each($array_to_search)) { |
|
39 | + $all_files[] = basename($array_to_search[$key]['path']); |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | //get all svg and png group files |
@@ -72,26 +72,26 @@ discard block |
||
72 | 72 | $group_properties['doc_state'] == 1 |
73 | 73 | ){ |
74 | 74 | |
75 | - if (!empty($png_svg_files)) { |
|
76 | - echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
|
77 | - echo '<ul>'; |
|
78 | - foreach($png_svg_files as $filename) { |
|
79 | - $image = $group_disk_path.$filename; |
|
80 | - |
|
81 | - if (strpos($filename, "svg")){ |
|
82 | - $new_sizes['width'] = 60; |
|
83 | - $new_sizes['height'] = 60; |
|
84 | - } else { |
|
85 | - $new_sizes = api_resize_image($image, 60, 60); |
|
86 | - } |
|
75 | + if (!empty($png_svg_files)) { |
|
76 | + echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
|
77 | + echo '<ul>'; |
|
78 | + foreach($png_svg_files as $filename) { |
|
79 | + $image = $group_disk_path.$filename; |
|
80 | + |
|
81 | + if (strpos($filename, "svg")){ |
|
82 | + $new_sizes['width'] = 60; |
|
83 | + $new_sizes['height'] = 60; |
|
84 | + } else { |
|
85 | + $new_sizes = api_resize_image($image, 60, 60); |
|
86 | + } |
|
87 | 87 | echo '<li style="display:inline; padding:8px;">'; |
88 | 88 | echo '<a href = "'.$group_web_path.$filename.'" alt="'.$filename.'" title="'.$filename.'">'; |
89 | 89 | echo '<img src = "'.$group_web_path.$filename.'" width = "'.$new_sizes['width'].'" height="'.$new_sizes['height'].'" border="0"></a></li>'; |
90 | - } |
|
91 | - echo '</ul>'; |
|
92 | - } |
|
90 | + } |
|
91 | + echo '</ul>'; |
|
92 | + } |
|
93 | 93 | } else { |
94 | - echo Display::display_warning_message(get_lang('OnlyAccessFromYourGroup')); |
|
94 | + echo Display::display_warning_message(get_lang('OnlyAccessFromYourGroup')); |
|
95 | 95 | } |
96 | 96 | ?> |
97 | 97 | </body> |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
53 | - * Set user chat status |
|
54 | - * @param int 0 if disconnected, 1 if connected |
|
55 | - * @param integer $status |
|
53 | + * Set user chat status |
|
54 | + * @param int 0 if disconnected, 1 if connected |
|
55 | + * @param integer $status |
|
56 | 56 | * |
57 | - * @return void |
|
58 | - */ |
|
57 | + * @return void |
|
58 | + */ |
|
59 | 59 | public function setUserStatus($status) |
60 | 60 | { |
61 | 61 | UserManager::update_extra_field_value(api_get_user_id(), 'user_chat_status', $status); |
@@ -156,10 +156,10 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * Returns an array of messages inside a chat session with a specific user |
|
160 | - * @param int The ID of the user with whom the current user is chatting |
|
161 | - * @return array Messages list |
|
162 | - */ |
|
159 | + * Returns an array of messages inside a chat session with a specific user |
|
160 | + * @param int The ID of the user with whom the current user is chatting |
|
161 | + * @return array Messages list |
|
162 | + */ |
|
163 | 163 | public function box_session($user_id) |
164 | 164 | { |
165 | 165 | $items = array(); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | } |
307 | 307 | } |
308 | 308 | |
309 | - return false; |
|
309 | + return false; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | /** |
@@ -5111,7 +5111,6 @@ |
||
5111 | 5111 | * @param string The current folder (path inside of the "document" directory, including the prefix "/") |
5112 | 5112 | * @param string Group directory, if empty, prevents documents to be uploaded (because group documents cannot be uploaded in root) |
5113 | 5113 | * @param boolean Whether to change the renderer (this will add a template <span> to the QuickForm object displaying the form) |
5114 | - |
|
5115 | 5114 | * @return string html form |
5116 | 5115 | */ |
5117 | 5116 | public static function build_directory_selector( |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Constructor |
20 | 20 | */ |
21 | - public function __construct() |
|
21 | + public function __construct() |
|
22 | 22 | { |
23 | 23 | $this->table = Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE); |
24 | - } |
|
24 | + } |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @param array $where_conditions |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Displays the title + grid |
41 | 41 | */ |
42 | - public function display() |
|
42 | + public function display() |
|
43 | 43 | { |
44 | - // action links |
|
45 | - $content = Display::actions(array( |
|
44 | + // action links |
|
45 | + $content = Display::actions(array( |
|
46 | 46 | array( |
47 | 47 | 'url' => 'event_type.php' , |
48 | 48 | 'content' => Display::return_icon( |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | array(), |
52 | 52 | ICON_SIZE_MEDIUM |
53 | 53 | ) |
54 | - ) |
|
54 | + ) |
|
55 | 55 | ) |
56 | 56 | ); |
57 | 57 | $content .= Display::grid_html('event_email_template'); |
58 | 58 | return $content; |
59 | - } |
|
59 | + } |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @return array |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'Height' => '250', |
101 | 101 | ) |
102 | 102 | ); |
103 | - $status_list = $this->get_status_list(); |
|
103 | + $status_list = $this->get_status_list(); |
|
104 | 104 | $form->addElement('select', 'status', get_lang('Status'), $status_list); |
105 | 105 | if ($action == 'edit') { |
106 | 106 | $form->addElement('text', 'created_at', get_lang('CreatedAt')); |
@@ -117,17 +117,17 @@ discard block |
||
117 | 117 | $defaults = $this->get($id); |
118 | 118 | |
119 | 119 | if (!empty($defaults['created_at'])) { |
120 | - $defaults['created_at'] = api_convert_and_format_date($defaults['created_at']); |
|
120 | + $defaults['created_at'] = api_convert_and_format_date($defaults['created_at']); |
|
121 | 121 | } |
122 | 122 | if (!empty($defaults['updated_at'])) { |
123 | - $defaults['updated_at'] = api_convert_and_format_date($defaults['updated_at']); |
|
123 | + $defaults['updated_at'] = api_convert_and_format_date($defaults['updated_at']); |
|
124 | 124 | } |
125 | 125 | $form->setDefaults($defaults); |
126 | 126 | |
127 | 127 | // Setting the rules |
128 | 128 | $form->addRule('name', get_lang('ThisFieldIsRequired'), 'required'); |
129 | 129 | |
130 | - return $form; |
|
130 | + return $form; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | public function get_count() |
@@ -340,9 +340,9 @@ discard block |
||
340 | 340 | } |
341 | 341 | |
342 | 342 | /** |
343 | - * This function shows the content of a table in a grid. |
|
344 | - * Should not be use to edit information (edit/delete rows) only. |
|
345 | - **/ |
|
343 | + * This function shows the content of a table in a grid. |
|
344 | + * Should not be use to edit information (edit/delete rows) only. |
|
345 | + **/ |
|
346 | 346 | public function display_grid() |
347 | 347 | { |
348 | 348 | $empty_table = false; |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | //$param[$tablename.'_direction'] = $_GET[$tablename.'_direction']; |
801 | 801 | $my_get_direction = $_GET[$tablename.'_direction']; |
802 | 802 | if (!in_array($my_get_direction, array('ASC', 'DESC'))) { |
803 | - $param[$tablename.'_direction'] = 'ASC'; |
|
803 | + $param[$tablename.'_direction'] = 'ASC'; |
|
804 | 804 | } else { |
805 | 805 | $param[$tablename.'_direction'] = $my_get_direction; |
806 | 806 | } |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | if (is_array($row)) { |
930 | 930 | foreach ($row as & $value) { |
931 | 931 | if (empty($value)) { |
932 | - $value = '-'; |
|
932 | + $value = '-'; |
|
933 | 933 | } |
934 | 934 | } |
935 | 935 | } |
@@ -288,17 +288,17 @@ discard block |
||
288 | 288 | } |
289 | 289 | } |
290 | 290 | |
291 | - if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
|
292 | - $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
293 | - } else { |
|
294 | - $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
295 | - } |
|
296 | - $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
|
297 | - $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
298 | - } |
|
299 | - |
|
300 | - return $html; |
|
301 | - } |
|
291 | + if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
|
292 | + $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
293 | + } else { |
|
294 | + $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
295 | + } |
|
296 | + $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
|
297 | + $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
298 | + } |
|
299 | + |
|
300 | + return $html; |
|
301 | + } |
|
302 | 302 | |
303 | 303 | /** |
304 | 304 | * @return string |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | $thereIsSubCat = true; |
579 | 579 | } elseif (api_get_setting('show_empty_course_categories') == 'true') { |
580 | 580 | /* End changed code to eliminate the (0 courses) after empty categories. */ |
581 | - $htmlListCat .= '<li>'; |
|
581 | + $htmlListCat .= '<li>'; |
|
582 | 582 | $htmlListCat .= $catLine['name']; |
583 | 583 | $htmlListCat .= "</li>"; |
584 | 584 | $thereIsSubCat = true; |
@@ -708,11 +708,11 @@ discard block |
||
708 | 708 | } |
709 | 709 | |
710 | 710 | /** |
711 | - * retrieves all the courses that the user has already subscribed to |
|
712 | - * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
|
713 | - * @param int $user_id: the id of the user |
|
714 | - * @return array an array containing all the information of the courses of the given user |
|
715 | - */ |
|
711 | + * retrieves all the courses that the user has already subscribed to |
|
712 | + * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
|
713 | + * @param int $user_id: the id of the user |
|
714 | + * @return array an array containing all the information of the courses of the given user |
|
715 | + */ |
|
716 | 716 | public function get_courses_of_user($user_id) |
717 | 717 | { |
718 | 718 | $table_course = Database::get_main_table(TABLE_MAIN_COURSE); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | if (!isset($used_lang_vars)) { |
102 | - $used_lang_vars = array(); |
|
102 | + $used_lang_vars = array(); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // Caching results from some API functions, for speed. |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | static $text_direction = array(); |
301 | 301 | |
302 | 302 | if (empty($language)) { |
303 | - $language = api_get_interface_language(); |
|
303 | + $language = api_get_interface_language(); |
|
304 | 304 | } |
305 | 305 | if (!isset($text_direction[$language])) { |
306 | 306 | $text_direction[$language] = in_array( |
@@ -1723,7 +1723,6 @@ discard block |
||
1723 | 1723 | |
1724 | 1724 | /** |
1725 | 1725 | * Return true a date is valid |
1726 | - |
|
1727 | 1726 | * @param string $date example: 2014-06-30 13:05:05 |
1728 | 1727 | * @param string $format example: "Y-m-d H:i:s" |
1729 | 1728 | * |
@@ -1996,15 +1995,15 @@ discard block |
||
1996 | 1995 | { |
1997 | 1996 | if ($showTime) { |
1998 | 1997 | if ($humanForm) { |
1999 | - return $date->format('j M Y H:i:s'); |
|
1998 | + return $date->format('j M Y H:i:s'); |
|
2000 | 1999 | } else { |
2001 | - return $date->format('Y-m-d H:i:s'); |
|
2000 | + return $date->format('Y-m-d H:i:s'); |
|
2002 | 2001 | } |
2003 | 2002 | } else { |
2004 | 2003 | if ($humanForm) { |
2005 | - return $date->format('j M Y'); |
|
2004 | + return $date->format('j M Y'); |
|
2006 | 2005 | } else { |
2007 | - return $date->format('Y-m-d'); |
|
2006 | + return $date->format('Y-m-d'); |
|
2008 | 2007 | } |
2009 | 2008 | } |
2010 | 2009 | } |