@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | api_protect_course_script(true); |
22 | 22 | |
23 | 23 | $lib_path = api_get_path(LIBRARY_PATH); |
24 | -$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT); |
|
24 | +$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT); |
|
25 | 25 | |
26 | 26 | $nameTools = get_lang('Blogs'); |
27 | 27 | $DaysShort = api_get_week_days_short(); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $safe_comment_title, |
135 | 135 | $safe_comment_text, |
136 | 136 | $blog_id, |
137 | - (int)$_GET['post_id'], |
|
137 | + (int) $_GET['post_id'], |
|
138 | 138 | $_POST['comment_parent_id'], |
139 | 139 | $_POST['task_id'] |
140 | 140 | ); |
@@ -146,29 +146,29 @@ discard block |
||
146 | 146 | if (!empty($_POST['register'])) { |
147 | 147 | if (is_array($_POST['user'])) { |
148 | 148 | foreach ($_POST['user'] as $index => $user_id) { |
149 | - Blog :: set_user_subscribed((int)$_GET['blog_id'], $user_id); |
|
149 | + Blog :: set_user_subscribed((int) $_GET['blog_id'], $user_id); |
|
150 | 150 | } |
151 | 151 | } |
152 | 152 | } |
153 | 153 | if (!empty($_POST['unregister'])) { |
154 | 154 | if (is_array($_POST['user'])) { |
155 | 155 | foreach ($_POST['user'] as $index => $user_id) { |
156 | - Blog :: set_user_unsubscribed((int)$_GET['blog_id'], $user_id); |
|
156 | + Blog :: set_user_unsubscribed((int) $_GET['blog_id'], $user_id); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | } |
160 | 160 | if (!empty($_GET['register'])) { |
161 | - Blog :: set_user_subscribed((int)$_GET['blog_id'], (int)$_GET['user_id']); |
|
161 | + Blog :: set_user_subscribed((int) $_GET['blog_id'], (int) $_GET['user_id']); |
|
162 | 162 | $return_message = array('type' => 'confirmation', 'message' => get_lang('UserRegistered')); |
163 | 163 | $flag = 1; |
164 | 164 | } |
165 | 165 | if (!empty($_GET['unregister'])) { |
166 | - Blog :: set_user_unsubscribed((int)$_GET['blog_id'], (int)$_GET['user_id']); |
|
166 | + Blog :: set_user_unsubscribed((int) $_GET['blog_id'], (int) $_GET['user_id']); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | if (isset($_GET['action']) && $_GET['action'] == 'manage_tasks') { |
170 | 170 | if (isset($_GET['do']) && $_GET['do'] == 'delete') { |
171 | - Blog :: delete_task($blog_id, (int)$_GET['task_id']); |
|
171 | + Blog :: delete_task($blog_id, (int) $_GET['task_id']); |
|
172 | 172 | $return_message = array('type' => 'confirmation', 'message' => get_lang('TaskDeleted')); |
173 | 173 | } |
174 | 174 | |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | if (isset($_GET['action']) && $_GET['action'] == 'view_post') { |
182 | 182 | $task_id = (isset ($_GET['task_id']) && is_numeric($_GET['task_id'])) ? $_GET['task_id'] : 0; |
183 | 183 | |
184 | - if (isset($_GET['do']) && $_GET['do'] == 'delete_comment') { |
|
184 | + if (isset($_GET['do']) && $_GET['do'] == 'delete_comment') { |
|
185 | 185 | if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id)) { |
186 | - Blog :: delete_comment($blog_id, (int)$_GET['post_id'],(int)$_GET['comment_id']); |
|
186 | + Blog :: delete_comment($blog_id, (int) $_GET['post_id'], (int) $_GET['comment_id']); |
|
187 | 187 | $return_message = array('type' => 'confirmation', 'message' => get_lang('CommentDeleted')); |
188 | 188 | } else { |
189 | 189 | $error = true; |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | } |
192 | 192 | } |
193 | 193 | |
194 | - if (isset($_GET['do']) && $_GET['do'] == 'delete_article') { |
|
194 | + if (isset($_GET['do']) && $_GET['do'] == 'delete_article') { |
|
195 | 195 | if (api_is_allowed('BLOG_'.$blog_id, 'article_delete', $task_id)) { |
196 | - Blog :: delete_post($blog_id, (int)$_GET['article_id']); |
|
196 | + Blog :: delete_post($blog_id, (int) $_GET['article_id']); |
|
197 | 197 | $action = ''; // Article is gone, go to blog home |
198 | 198 | $return_message = array('type' => 'confirmation', 'message' => get_lang('BlogDeleted')); |
199 | 199 | } else { |
@@ -204,13 +204,13 @@ discard block |
||
204 | 204 | if (isset($_GET['do']) && $_GET['do'] == 'rate') { |
205 | 205 | if (isset($_GET['type']) && $_GET['type'] == 'post') { |
206 | 206 | if (api_is_allowed('BLOG_'.$blog_id, 'article_rate')) { |
207 | - Blog :: add_rating('post', $blog_id, (int)$_GET['post_id'], (int)$_GET['rating']); |
|
207 | + Blog :: add_rating('post', $blog_id, (int) $_GET['post_id'], (int) $_GET['rating']); |
|
208 | 208 | $return_message = array('type' => 'confirmation', 'message' => get_lang('RatingAdded')); |
209 | 209 | } |
210 | 210 | } |
211 | 211 | if (isset($_GET['type']) && $_GET['type'] == 'comment') { |
212 | 212 | if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_add')) { |
213 | - Blog :: add_rating('comment', $blog_id, (int)$_GET['comment_id'], (int)$_GET['rating']); |
|
213 | + Blog :: add_rating('comment', $blog_id, (int) $_GET['comment_id'], (int) $_GET['rating']); |
|
214 | 214 | $return_message = array('type' => 'confirmation', 'message' => get_lang('RatingAdded')); |
215 | 215 | } |
216 | 216 | } |
@@ -289,16 +289,16 @@ discard block |
||
289 | 289 | echo '<div class=actions>'; |
290 | 290 | ?> |
291 | 291 | <a href="<?php echo api_get_self(); ?>?blog_id=<?php echo $blog_id ?>&<?php echo api_get_cidreq(); ?>" title="<?php echo get_lang('Home') ?>"> |
292 | - <?php echo Display::return_icon('blog.png', get_lang('Home'),'',ICON_SIZE_MEDIUM); ?></a> |
|
293 | - <?php if(api_is_allowed('BLOG_'.$blog_id, 'article_add')) { ?> |
|
292 | + <?php echo Display::return_icon('blog.png', get_lang('Home'), '', ICON_SIZE_MEDIUM); ?></a> |
|
293 | + <?php if (api_is_allowed('BLOG_'.$blog_id, 'article_add')) { ?> |
|
294 | 294 | <a href="<?php echo api_get_self(); ?>?action=new_post&blog_id=<?php echo $blog_id ?>" title="<?php echo get_lang('NewPost') ?>"> |
295 | - <?php echo Display::return_icon('new_article.png', get_lang('NewPost'),'',ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
296 | - <?php if(api_is_allowed('BLOG_'.$blog_id, 'task_management')) { ?> |
|
295 | + <?php echo Display::return_icon('new_article.png', get_lang('NewPost'), '', ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
296 | + <?php if (api_is_allowed('BLOG_'.$blog_id, 'task_management')) { ?> |
|
297 | 297 | <a href="<?php echo api_get_self(); ?>?action=manage_tasks&blog_id=<?php echo $blog_id ?>" title="<?php echo get_lang('ManageTasks') ?>"> |
298 | - <?php echo Display::return_icon('blog_tasks.png', get_lang('TaskManager'),'',ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
299 | - <?php if(api_is_allowed('BLOG_'.$blog_id, 'member_management')) { ?> |
|
298 | + <?php echo Display::return_icon('blog_tasks.png', get_lang('TaskManager'), '', ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
299 | + <?php if (api_is_allowed('BLOG_'.$blog_id, 'member_management')) { ?> |
|
300 | 300 | <a href="<?php echo api_get_self(); ?>?action=manage_members&blog_id=<?php echo $blog_id ?>" title="<?php echo get_lang('ManageMembers') ?>"> |
301 | - <?php echo Display::return_icon('blog_admin_users.png', get_lang('MemberManager'),'',ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
301 | + <?php echo Display::return_icon('blog_admin_users.png', get_lang('MemberManager'), '', ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
302 | 302 | <?php |
303 | 303 | echo '</div>'; |
304 | 304 | |
@@ -316,8 +316,8 @@ discard block |
||
316 | 316 | <div class="panel-heading"><?php echo get_lang('Calendar') ?></div> |
317 | 317 | <div class="panel-body"> |
318 | 318 | <?php |
319 | - $month = isset($_GET['month']) ? (int)$_GET['month'] : (int) date('m'); |
|
320 | - $year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
319 | + $month = isset($_GET['month']) ? (int) $_GET['month'] : (int) date('m'); |
|
320 | + $year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
321 | 321 | Blog::display_minimonthcalendar($month, $year, $blog_id); |
322 | 322 | ?> |
323 | 323 | </div> |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $course_id = api_get_course_int_id(); |
363 | 363 | |
364 | 364 | if (isset ($_GET['task_id']) && is_numeric($_GET['task_id'])) { |
365 | - $task_id = (int)$_GET['task_id']; |
|
365 | + $task_id = (int) $_GET['task_id']; |
|
366 | 366 | } else { |
367 | 367 | $task_id = 0; |
368 | 368 | $tbl_blogs_tasks_rel_user = Database :: get_course_table(TABLE_BLOGS_TASKS_REL_USER); |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | $cidReset = true; |
7 | 7 | require_once '../inc/global.inc.php'; |
8 | 8 | api_block_anonymous_users(); |
9 | -if (api_get_setting('allow_message_tool')!='true') { |
|
9 | +if (api_get_setting('allow_message_tool') != 'true') { |
|
10 | 10 | api_not_allowed(); |
11 | 11 | } |
12 | 12 | |
13 | 13 | if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') { |
14 | 14 | $this_section = SECTION_SOCIAL; |
15 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | - $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
15 | + $interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/social/home.php', 'name' => get_lang('Social')); |
|
16 | + $interbreadcrumb[] = array('url' => 'inbox.php?f=social', 'name' => get_lang('Inbox')); |
|
17 | 17 | } else { |
18 | 18 | $this_section = SECTION_MYPROFILE; |
19 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
19 | + $interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/auth/profile.php', 'name' => get_lang('Profile')); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $social_right_content = ''; |
23 | 23 | |
24 | -if (isset($_GET['f']) && $_GET['f']=='social') { |
|
24 | +if (isset($_GET['f']) && $_GET['f'] == 'social') { |
|
25 | 25 | $social_parameter = '?f=social'; |
26 | 26 | } else { |
27 | 27 | if (api_get_setting('extended_profile') == 'true') { |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | } |
34 | 34 | if (api_get_setting('allow_message_tool') == 'true') { |
35 | 35 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
36 | - Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>'; |
|
36 | + Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>'; |
|
37 | 37 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
38 | - Display::return_icon('inbox.png',get_lang('Inbox')).'</a>'; |
|
38 | + Display::return_icon('inbox.png', get_lang('Inbox')).'</a>'; |
|
39 | 39 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
40 | - Display::return_icon('outbox.png',get_lang('Outbox')).'</a>'; |
|
40 | + Display::return_icon('outbox.png', get_lang('Outbox')).'</a>'; |
|
41 | 41 | } |
42 | 42 | $social_right_content .= '</div>'; |
43 | 43 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $show_menu = 'messages_inbox'; |
54 | 54 | } |
55 | 55 | |
56 | -$message = ''; |
|
56 | +$message = ''; |
|
57 | 57 | |
58 | 58 | // LEFT COLUMN |
59 | 59 | if (api_get_setting('allow_social_tool') == 'true') { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public static function setErrorHandler($handler) |
51 | 51 | { |
52 | - if($handler instanceof WSErrorHandler) { |
|
52 | + if ($handler instanceof WSErrorHandler) { |
|
53 | 53 | self::$_handler = $handler; |
54 | 54 | } |
55 | 55 | } |
@@ -120,12 +120,12 @@ discard block |
||
120 | 120 | // if we are behind a reverse proxy, assume it will send the |
121 | 121 | // HTTP_X_FORWARDED_FOR header and use this IP instead |
122 | 122 | if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
123 | - list($ip1,$ip2) = split(',',$_SERVER['HTTP_X_FORWARDED_FOR']); |
|
123 | + list($ip1, $ip2) = split(',', $_SERVER['HTTP_X_FORWARDED_FOR']); |
|
124 | 124 | $ip = trim($ip1); |
125 | 125 | } |
126 | 126 | $security_key = $ip.$this->_configuration['security_key']; |
127 | 127 | |
128 | - if(!api_is_valid_secret_key($secret_key, $security_key)) { |
|
128 | + if (!api_is_valid_secret_key($secret_key, $security_key)) { |
|
129 | 129 | return new WSCMError(1, "API key is invalid"); |
130 | 130 | } else { |
131 | 131 | return null; |
@@ -195,15 +195,15 @@ discard block |
||
195 | 195 | */ |
196 | 196 | protected function getUserId($user_id_field_name, $user_id_value) |
197 | 197 | { |
198 | - if($user_id_field_name == "chamilo_user_id") { |
|
199 | - if(UserManager::is_user_id_valid(intval($user_id_value))) { |
|
198 | + if ($user_id_field_name == "chamilo_user_id") { |
|
199 | + if (UserManager::is_user_id_valid(intval($user_id_value))) { |
|
200 | 200 | return intval($user_id_value); |
201 | 201 | } else { |
202 | 202 | return new WSCMError(100, "User not found"); |
203 | 203 | } |
204 | 204 | } else { |
205 | 205 | $user_id = UserManager::get_user_id_from_original_id($user_id_value, $user_id_field_name); |
206 | - if($user_id == 0) { |
|
206 | + if ($user_id == 0) { |
|
207 | 207 | return new WSCMError(100, "User not found"); |
208 | 208 | } else { |
209 | 209 | return $user_id; |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | */ |
223 | 223 | protected function getCourseId($course_id_field_name, $course_id_value) |
224 | 224 | { |
225 | - if($course_id_field_name == "chamilo_course_id") { |
|
226 | - if(CourseManager::get_course_code_from_course_id(intval($course_id_value)) != null) { |
|
225 | + if ($course_id_field_name == "chamilo_course_id") { |
|
226 | + if (CourseManager::get_course_code_from_course_id(intval($course_id_value)) != null) { |
|
227 | 227 | return intval($course_id_value); |
228 | 228 | } else { |
229 | 229 | return new WSCMError(200, "Course not found"); |
@@ -250,8 +250,8 @@ discard block |
||
250 | 250 | protected function getSessionId($session_id_field_name, $session_id_value) |
251 | 251 | { |
252 | 252 | if ($session_id_field_name == "chamilo_session_id") { |
253 | - $session = SessionManager::fetch((int)$session_id_value); |
|
254 | - if(!empty($session)) { |
|
253 | + $session = SessionManager::fetch((int) $session_id_value); |
|
254 | + if (!empty($session)) { |
|
255 | 255 | return intval($session_id_value); |
256 | 256 | } else { |
257 | 257 | return new WSCMError(300, "Session not found"); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $session_id_value, |
262 | 262 | $session_id_field_name |
263 | 263 | ); |
264 | - if($session_id == 0) { |
|
264 | + if ($session_id == 0) { |
|
265 | 265 | return new WSCMError(300, "Session not found"); |
266 | 266 | } else { |
267 | 267 | return $session_id; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <script> |
21 | 21 | $(document).ready(function() { |
22 | 22 | $.ajax({ |
23 | - url: "'. api_get_path(WEB_CODE_PATH) .'inc/ajax/statistics.ajax.php?a=recentlogins", |
|
23 | + url: "'. api_get_path(WEB_CODE_PATH).'inc/ajax/statistics.ajax.php?a=recentlogins", |
|
24 | 24 | type: "POST", |
25 | 25 | success: function(data) { |
26 | 26 | Chart.defaults.global.responsive = true; |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | // users ... |
51 | 51 | $tools[$strUsers]['report=users'] = get_lang('CountUsers'); |
52 | 52 | $tools[$strUsers]['report=recentlogins'] = get_lang('Logins'); |
53 | -$tools[$strUsers]['report=logins&type=month'] = get_lang('Logins') . ' (' . get_lang('PeriodMonth') . ')'; |
|
54 | -$tools[$strUsers]['report=logins&type=day'] = get_lang('Logins') . ' (' . get_lang('PeriodDay') . ')'; |
|
55 | -$tools[$strUsers]['report=logins&type=hour'] = get_lang('Logins') . ' (' . get_lang('PeriodHour') . ')'; |
|
56 | -$tools[$strUsers]['report=pictures'] = get_lang('CountUsers') . ' (' . get_lang('UserPicture') . ')'; |
|
53 | +$tools[$strUsers]['report=logins&type=month'] = get_lang('Logins').' ('.get_lang('PeriodMonth').')'; |
|
54 | +$tools[$strUsers]['report=logins&type=day'] = get_lang('Logins').' ('.get_lang('PeriodDay').')'; |
|
55 | +$tools[$strUsers]['report=logins&type=hour'] = get_lang('Logins').' ('.get_lang('PeriodHour').')'; |
|
56 | +$tools[$strUsers]['report=pictures'] = get_lang('CountUsers').' ('.get_lang('UserPicture').')'; |
|
57 | 57 | $tools[$strUsers]['report=no_login_users'] = get_lang('StatsUsersDidNotLoginInLastPeriods'); |
58 | 58 | $tools[$strUsers]['report=zombies'] = get_lang('Zombies'); |
59 | 59 | |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | echo '<table><tr>'; |
69 | 69 | foreach ($tools as $section => $items) { |
70 | 70 | echo '<td style="vertical-align:top;">'; |
71 | - echo '<h3>' . $section . '</h3>'; |
|
71 | + echo '<h3>'.$section.'</h3>'; |
|
72 | 72 | echo '<ul>'; |
73 | 73 | foreach ($items as $key => $value) { |
74 | - echo '<li><a href="index.php?' . $key . '">' . $value . '</a></li>'; |
|
74 | + echo '<li><a href="index.php?'.$key.'">'.$value.'</a></li>'; |
|
75 | 75 | } |
76 | 76 | echo '</ul>'; |
77 | 77 | echo '</td>'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | echo '</tr></table>'; |
80 | 80 | |
81 | 81 | $course_categories = Statistics::getCourseCategories(); |
82 | -echo '<br/><br/>';//@todo: spaces between elements should be handled in the css, br should be removed if only there for presentation |
|
82 | +echo '<br/><br/>'; //@todo: spaces between elements should be handled in the css, br should be removed if only there for presentation |
|
83 | 83 | |
84 | 84 | switch ($report) { |
85 | 85 | case 'courses': |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | Statistics::printStats(get_lang('Students'), $students); |
122 | 122 | break; |
123 | 123 | case 'recentlogins': |
124 | - echo '<h2>'. sprintf(get_lang('LastXDays'), '15') . '</h2>'; |
|
124 | + echo '<h2>'.sprintf(get_lang('LastXDays'), '15').'</h2>'; |
|
125 | 125 | echo '<canvas class="col-md-12" id="canvas" height="100px" style="margin-bottom: 20px"></canvas>'; |
126 | 126 | Statistics::printRecentLoginStats(); |
127 | 127 | Statistics::printRecentLoginStats(true); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @since 25/september/2010 |
6 | 6 | */ |
7 | 7 | |
8 | -require_once '../../../../inc/global.inc.php';//hack for Chamilo |
|
8 | +require_once '../../../../inc/global.inc.php'; //hack for Chamilo |
|
9 | 9 | api_protect_course_script(); |
10 | 10 | api_block_anonymous_users(); |
11 | 11 | if (!isset($_SESSION['draw_dir'])) { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | exit; |
9 | 9 | } |
10 | 10 | $svg = $_POST['output_svg']; |
11 | - $filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved') . '.svg'; // These characters are indicated as prohibited by Windows |
|
11 | + $filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved').'.svg'; // These characters are indicated as prohibited by Windows |
|
12 | 12 | |
13 | 13 | $fh = fopen($filename, 'w') or die("Can't open file"); |
14 | 14 | fwrite($fh, $svg); |
@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | $slideshow_extension = strrchr($file, '.'); |
26 | 26 | $slideshow_extension = strtolower($slideshow_extension); |
27 | 27 | if (in_array($slideshow_extension, $accepted_extensions)) { |
28 | - $png_svg_files[] =$file; |
|
28 | + $png_svg_files[] = $file; |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | } |
32 | 32 | $style = '<style>'; |
33 | 33 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
34 | 34 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
35 | -$style .='</style>'; |
|
35 | +$style .= '</style>'; |
|
36 | 36 | |
37 | 37 | ?> |
38 | 38 | <!doctype html> |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | if (!empty($png_svg_files)) { |
49 | 49 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
50 | 50 | echo '<ul>'; |
51 | - foreach($png_svg_files as $filename) { |
|
51 | + foreach ($png_svg_files as $filename) { |
|
52 | 52 | $image = $user_disk_path.$filename; |
53 | 53 | |
54 | - if (strpos($filename, "svg")){ |
|
54 | + if (strpos($filename, "svg")) { |
|
55 | 55 | $new_sizes['width'] = 60; |
56 | 56 | $new_sizes['height'] = 60; |
57 | 57 | } else { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $slideshow_extension = strrchr($file, '.'); |
48 | 48 | $slideshow_extension = strtolower($slideshow_extension); |
49 | 49 | if (in_array($slideshow_extension, $accepted_extensions)) { |
50 | - $png_svg_files[] =$file; |
|
50 | + $png_svg_files[] = $file; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $style = '<style>'; |
56 | 56 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
57 | 57 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
58 | -$style .='</style>'; |
|
58 | +$style .= '</style>'; |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | <!doctype html> |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | if (( |
69 | 69 | $group_properties['doc_state'] == 2 && |
70 | 70 | ($is_allowed_to_edit || GroupManager :: is_user_in_group($_user['user_id'], $groupId))) || $group_properties['doc_state'] == 1 |
71 | -){ |
|
71 | +) { |
|
72 | 72 | |
73 | 73 | if (!empty($png_svg_files)) { |
74 | 74 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
75 | 75 | echo '<ul>'; |
76 | - foreach($png_svg_files as $filename) { |
|
76 | + foreach ($png_svg_files as $filename) { |
|
77 | 77 | $image = $group_disk_path.$filename; |
78 | 78 | |
79 | - if (strpos($filename, "svg")){ |
|
79 | + if (strpos($filename, "svg")) { |
|
80 | 80 | $new_sizes['width'] = 60; |
81 | 81 | $new_sizes['height'] = 60; |
82 | 82 | } else { |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
14 | 14 | |
15 | -$curdirpath='/images/gallery'; //path of library directory |
|
15 | +$curdirpath = '/images/gallery'; //path of library directory |
|
16 | 16 | |
17 | 17 | $course_info = api_get_course_info(); |
18 | 18 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $slideshow_extension = strrchr($file, '.'); |
37 | 37 | $slideshow_extension = strtolower($slideshow_extension); |
38 | 38 | if (in_array($slideshow_extension, $accepted_extensions)) { |
39 | - $png_svg_files[] =$file; |
|
39 | + $png_svg_files[] = $file; |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $style = '<style>'; |
48 | 48 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
49 | 49 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
50 | -$style .='</style>'; |
|
50 | +$style .= '</style>'; |
|
51 | 51 | |
52 | 52 | ?> |
53 | 53 | <!doctype html> |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | if (!empty($png_svg_files)) { |
60 | 60 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
61 | 61 | echo '<ul>'; |
62 | - foreach($png_svg_files as $filename) { |
|
63 | - $image=$disk_path.$filename; |
|
62 | + foreach ($png_svg_files as $filename) { |
|
63 | + $image = $disk_path.$filename; |
|
64 | 64 | |
65 | - if (strpos($filename, "svg")){ |
|
65 | + if (strpos($filename, "svg")) { |
|
66 | 66 | $new_sizes['width'] = 60; |
67 | 67 | $new_sizes['height'] = 60; |
68 | 68 | } |