@@ -38,7 +38,7 @@ |
||
38 | 38 | $config = api_get_settings_params(array('subkey = ? ' => 'customfooter', ' AND category = ? ' => 'Plugins')); |
39 | 39 | foreach ($config as $fooid => $configrecord) { |
40 | 40 | $canonic = preg_replace('/^customfooter_/', '', $configrecord['variable']); |
41 | - if (in_array($canonic, array('footer_left', 'footer_right'))){ |
|
41 | + if (in_array($canonic, array('footer_left', 'footer_right'))) { |
|
42 | 42 | $form_settings[$canonic] = $configrecord['selected_value']; |
43 | 43 | } |
44 | 44 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | parent::__construct('1.1', 'Valery Fremaux'); |
27 | 27 | } |
28 | 28 | |
29 | - function pix_url($pixname, $size = 16) { |
|
29 | + function pix_url($pixname, $size = 16) { |
|
30 | 30 | global $_configuration; |
31 | 31 | |
32 | 32 | if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')){ |
@@ -29,13 +29,13 @@ |
||
29 | 29 | function pix_url($pixname, $size = 16) { |
30 | 30 | global $_configuration; |
31 | 31 | |
32 | - if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')){ |
|
32 | + if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')) { |
|
33 | 33 | return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.png'; |
34 | 34 | } |
35 | - if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.jpg')){ |
|
35 | + if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.jpg')) { |
|
36 | 36 | return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.jpg'; |
37 | 37 | } |
38 | - if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.gif')){ |
|
38 | + if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.gif')) { |
|
39 | 39 | return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.gif'; |
40 | 40 | } |
41 | 41 | return $_configuration['root_web'].'/main/img/icons/'.$size.'/'.$pixname.'.png'; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | require_once '../inc/lib/baker.lib.php'; |
10 | 10 | |
11 | 11 | if (!isset($_REQUEST['user'], $_REQUEST['issue'])) { |
12 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
12 | + header('Location: '.api_get_path(WEB_PATH)); |
|
13 | 13 | exit; |
14 | 14 | } |
15 | 15 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | Display::return_message(get_lang('NoResults'), 'error') |
25 | 25 | ); |
26 | 26 | |
27 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
27 | + header('Location: '.api_get_path(WEB_PATH)); |
|
28 | 28 | exit; |
29 | 29 | } |
30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | Display::return_message(get_lang('NoResults'), 'error') |
34 | 34 | ); |
35 | 35 | |
36 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
36 | + header('Location: '.api_get_path(WEB_PATH)); |
|
37 | 37 | exit; |
38 | 38 | } |
39 | 39 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $entityManager->persist($skillIssue); |
145 | 145 | $entityManager->flush(); |
146 | 146 | |
147 | - header("Location: " . $skillIssue->getIssueUrl()); |
|
147 | + header("Location: ".$skillIssue->getIssueUrl()); |
|
148 | 148 | exit; |
149 | 149 | } |
150 | 150 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $entityManager->persist($skillUserComment); |
176 | 176 | $entityManager->flush(); |
177 | 177 | |
178 | - header("Location: " . $skillIssue->getIssueUrl()); |
|
178 | + header("Location: ".$skillIssue->getIssueUrl()); |
|
179 | 179 | exit; |
180 | 180 | } |
181 | 181 | |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | $backpack = $configBackpack; |
192 | 192 | } |
193 | 193 | |
194 | - $htmlHeadXtra[] = '<script src="' . $backpack . 'issuer.js"></script>'; |
|
194 | + $htmlHeadXtra[] = '<script src="'.$backpack.'issuer.js"></script>'; |
|
195 | 195 | $objSkill = new Skill(); |
196 | 196 | $assertionUrl = $skillIssueInfo['badge_asserion'][0]; |
197 | 197 | $skills = $objSkill->get($skillId); |
198 | - $unbakedBadge = api_get_path(SYS_UPLOAD_PATH) . "badges/".$skills['icon']; |
|
198 | + $unbakedBadge = api_get_path(SYS_UPLOAD_PATH)."badges/".$skills['icon']; |
|
199 | 199 | |
200 | 200 | $unbakedBadge = file_get_contents($unbakedBadge); |
201 | 201 | $badgeInfoError = false; |
@@ -210,12 +210,12 @@ discard block |
||
210 | 210 | mkdir($bakedBadge, api_get_permissions_for_new_directories(), true); |
211 | 211 | } |
212 | 212 | $skillRelUserId = $skillIssueInfo['id']; |
213 | - if (!file_exists($bakedBadge . "/badge_" . $skillRelUserId)) { |
|
214 | - file_put_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png", $bakedInfo); |
|
213 | + if (!file_exists($bakedBadge."/badge_".$skillRelUserId)) { |
|
214 | + file_put_contents($bakedBadge."/badge_".$skillRelUserId.".png", $bakedInfo); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | //Process to validate a baked badge |
218 | - $badgeContent = file_get_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png"); |
|
218 | + $badgeContent = file_get_contents($bakedBadge."/badge_".$skillRelUserId.".png"); |
|
219 | 219 | $verifyBakedBadge = $png->extractBadgeInfo($badgeContent); |
220 | 220 | if (!is_array($verifyBakedBadge)) { |
221 | 221 | $badgeInfoError = true; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | if (!$badgeInfoError) { |
225 | 225 | $personalBadge = UserManager::getUserPathById($userId, "web"); |
226 | - $personalBadge = $personalBadge."badges/badge_" . $skillRelUserId . ".png"; |
|
226 | + $personalBadge = $personalBadge."badges/badge_".$skillRelUserId.".png"; |
|
227 | 227 | } |
228 | 228 | } |
229 | 229 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | $listAction = api_get_self(); |
18 | 18 | |
19 | -$action = ''; |
|
19 | +$action = ''; |
|
20 | 20 | if (isset($_GET['action']) && in_array($_GET['action'], ['add', 'edit', 'delete', 'add_level'])) { |
21 | 21 | $action = $_GET['action']; |
22 | 22 | } |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | } |
50 | 50 | $formToDisplay = $form->returnForm(); |
51 | 51 | |
52 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
53 | -$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('SkillProfile')); |
|
52 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
53 | +$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('SkillProfile')); |
|
54 | 54 | |
55 | 55 | $tpl = new Template($action); |
56 | 56 | switch ($action) { |
@@ -5,10 +5,10 @@ |
||
5 | 5 | * @author Angel Fernando Quiroz Campos <[email protected]> |
6 | 6 | * @package chamilo.plugin.tour |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | -$pluginPath = api_get_path(SYS_PLUGIN_PATH) . 'tour/'; |
|
11 | -$pluginWebPath = api_get_path(WEB_PLUGIN_PATH) . 'tour/'; |
|
10 | +$pluginPath = api_get_path(SYS_PLUGIN_PATH).'tour/'; |
|
11 | +$pluginWebPath = api_get_path(WEB_PLUGIN_PATH).'tour/'; |
|
12 | 12 | |
13 | 13 | $userId = api_get_user_id(); |
14 | 14 |
@@ -129,8 +129,8 @@ |
||
129 | 129 | */ |
130 | 130 | public function getTourConfig() |
131 | 131 | { |
132 | - $pluginPath = api_get_path(SYS_PLUGIN_PATH) . 'tour/'; |
|
133 | - $jsonContent = file_get_contents($pluginPath . 'config/tour.json'); |
|
132 | + $pluginPath = api_get_path(SYS_PLUGIN_PATH).'tour/'; |
|
133 | + $jsonContent = file_get_contents($pluginPath.'config/tour.json'); |
|
134 | 134 | $jsonData = json_decode($jsonContent, true); |
135 | 135 | |
136 | 136 | return $jsonData; |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | define('TABLE_TOUR_LOG', 'plugin_tour_log'); |
11 | 11 | |
12 | -require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php'; |
|
13 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
14 | -require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php'; |
|
12 | +require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; |
|
13 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
14 | +require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php'; |
|
15 | 15 | // Edit the config/tour.json file to add more pages or more elements to the guide |
@@ -6,8 +6,8 @@ |
||
6 | 6 | * @package chamilo.plugin.tour |
7 | 7 | */ |
8 | 8 | require_once __DIR__.'/../../../main/inc/global.inc.php'; |
9 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
10 | -require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php'; |
|
9 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
10 | +require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php'; |
|
11 | 11 | |
12 | 12 | if (!api_is_anonymous()) { |
13 | 13 | $currentPageClass = isset($_GET['page_class']) ? $_GET['page_class'] : ''; |
@@ -50,26 +50,26 @@ discard block |
||
50 | 50 | // Please, do not modify this dirname formatting |
51 | 51 | |
52 | 52 | if (strstr($dir, '..')) { |
53 | - $dir = '/'; |
|
53 | + $dir = '/'; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | if ($dir[0] == '.') { |
57 | - $dir = substr($dir, 1); |
|
57 | + $dir = substr($dir, 1); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if ($dir[0] != '/') { |
61 | - $dir = '/'.$dir; |
|
61 | + $dir = '/'.$dir; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | if ($dir[strlen($dir) - 1] != '/') { |
65 | - $dir .= '/'; |
|
65 | + $dir .= '/'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir; |
69 | 69 | |
70 | 70 | if (!is_dir($filepath)) { |
71 | - $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; |
|
72 | - $dir = '/'; |
|
71 | + $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; |
|
72 | + $dir = '/'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $groupId = api_get_group_id(); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || |
100 | - DocumentManager::is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id())) |
|
100 | + DocumentManager::is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id())) |
|
101 | 101 | ) { |
102 | 102 | api_not_allowed(true); |
103 | 103 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | // Interbreadcrumb for the current directory root path |
116 | 116 | if (empty($document_data['parents'])) { |
117 | - $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
|
117 | + $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
|
118 | 118 | } else { |
119 | 119 | foreach ($document_data['parents'] as $document_sub_data) { |
120 | 120 | $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']); |
@@ -147,17 +147,17 @@ discard block |
||
147 | 147 | $locktitle="false"; |
148 | 148 | |
149 | 149 | if ($_SERVER['HTTP_HOST']=="localhost") { |
150 | - $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
151 | - if (!file_exists($path_and_file)) { |
|
152 | - $crossdomain='<?xml version="1.0"?> |
|
150 | + $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
151 | + if (!file_exists($path_and_file)) { |
|
152 | + $crossdomain='<?xml version="1.0"?> |
|
153 | 153 | <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> |
154 | 154 | <cross-domain-policy> |
155 | 155 | <allow-access-from domain="cdn.pixlr.com" /> |
156 | 156 | <site-control permitted-cross-domain-policies="master-only"/> |
157 | 157 | <allow-http-request-headers-from domain="cnd.pixlr.com" headers="*" secure="true"/> |
158 | 158 | </cross-domain-policy>';//more open domain="*" |
159 | - @file_put_contents($path_and_file, $crossdomain); |
|
160 | - } |
|
159 | + @file_put_contents($path_and_file, $crossdomain); |
|
160 | + } |
|
161 | 161 | $credentials = "true"; |
162 | 162 | } else { |
163 | 163 | $credentials = "false"; |
@@ -129,27 +129,27 @@ |
||
129 | 129 | |
130 | 130 | // pixlr |
131 | 131 | // max size 1 Mb ?? |
132 | -$title = urlencode(utf8_encode(get_lang('NewImage')));//TODO:check |
|
132 | +$title = urlencode(utf8_encode(get_lang('NewImage'))); //TODO:check |
|
133 | 133 | // |
134 | 134 | $image = Display::returnIconPath('canvas1024x768.png'); |
135 | 135 | // |
136 | 136 | $pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn'); |
137 | -$langpixlr = api_get_language_isocode(); |
|
137 | +$langpixlr = api_get_language_isocode(); |
|
138 | 138 | $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_translation_table[$langpixlr] : $langpixlr; |
139 | -$loc=$langpixlr;// deprecated ?? TODO:check pixlr read user browser |
|
140 | - |
|
141 | -$exit_path=api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php'; |
|
142 | -$_SESSION['exit_pixlr']=$document_data['path']; |
|
143 | -$referrer="Chamilo"; |
|
144 | -$target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; |
|
145 | -$target=$target_path; |
|
146 | -$locktarget="true"; |
|
147 | -$locktitle="false"; |
|
148 | - |
|
149 | -if ($_SERVER['HTTP_HOST']=="localhost") { |
|
150 | - $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
139 | +$loc = $langpixlr; // deprecated ?? TODO:check pixlr read user browser |
|
140 | + |
|
141 | +$exit_path = api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php'; |
|
142 | +$_SESSION['exit_pixlr'] = $document_data['path']; |
|
143 | +$referrer = "Chamilo"; |
|
144 | +$target_path = api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; |
|
145 | +$target = $target_path; |
|
146 | +$locktarget = "true"; |
|
147 | +$locktitle = "false"; |
|
148 | + |
|
149 | +if ($_SERVER['HTTP_HOST'] == "localhost") { |
|
150 | + $path_and_file = api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
151 | 151 | if (!file_exists($path_and_file)) { |
152 | - $crossdomain='<?xml version="1.0"?> |
|
152 | + $crossdomain = '<?xml version="1.0"?> |
|
153 | 153 | <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> |
154 | 154 | <cross-domain-policy> |
155 | 155 | <allow-access-from domain="cdn.pixlr.com" /> |