Completed
Push — 1.11.x ( ca7787...41c0f2 )
by José
31:51
created
plugin/vchamilo/cli/bulkdestroynodes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 echo "Chamilo Bulk Nodes Creation v.1.0\n";
19 19
 echo "=================================\n";
20 20
 require_once('../../../main/inc/global.inc.php');
21
-require_once('clilib.php');       // cli only functions
21
+require_once('clilib.php'); // cli only functions
22 22
 // Ensure errors are well explained
23 23
 ini_set('debug_display', 1);
24 24
 ini_set('debug_level', E_ALL);
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
     }
91 91
 }
92 92
 
93
-require_once($_configuration['root_sys'].'local/classes/database.class.php');       // cli only functions
93
+require_once($_configuration['root_sys'].'local/classes/database.class.php'); // cli only functions
94 94
 if ($options['verbose']) echo "loaded dbclass\n";
95
-require_once($_configuration['root_sys'].'local/classes/textlib.class.php');       // cli only functions
95
+require_once($_configuration['root_sys'].'local/classes/textlib.class.php'); // cli only functions
96 96
 if ($options['verbose']) echo "loaded textlib\n";
97
-require_once($_configuration['root_sys'].'local/classes/mootochamlib.php');       // moodle like API
97
+require_once($_configuration['root_sys'].'local/classes/mootochamlib.php'); // moodle like API
98 98
 if ($options['verbose']) echo "loaded moodle wrapping\n";
99
-require_once($_configuration['root_sys'] . '/plugin/vchamilo/lib/vchamilo_plugin.class.php');
99
+require_once($_configuration['root_sys'].'/plugin/vchamilo/lib/vchamilo_plugin.class.php');
100 100
 if ($options['verbose']) echo "loaded vchamilo plugin\n";
101 101
 
102 102
 global $DB;
Please login to merge, or discard this patch.
plugin/customfooter/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  */
5 5
 
6 6
 if (isset($plugin_info['current_region'])) {
7
-    switch($plugin_info['current_region']) {
7
+    switch ($plugin_info['current_region']) {
8 8
         case 'footer_left':
9 9
             echo $plugin_info['settings']['customfooter_footer_left'];
10 10
             break;
Please login to merge, or discard this patch.
plugin/customfooter/lib/customfooter_plugin.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
main/admin/skill_level.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
plugin/tour/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
plugin/tour/src/tour_plugin.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,8 +129,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
plugin/tour/config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
plugin/tour/ajax/steps.ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
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'] : '';
Please login to merge, or discard this patch.
main/document/edit_paint.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -33,26 +33,26 @@  discard block
 block discarded – undo
33 33
     $my_cur_dir_path = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null;
34 34
 }
35 35
 
36
-$dir= str_replace('\\', '/', $dir);//and urlencode each url $curdirpath (hack clean $curdirpath under Windows - Bug #3261)
36
+$dir = str_replace('\\', '/', $dir); //and urlencode each url $curdirpath (hack clean $curdirpath under Windows - Bug #3261)
37 37
 
38 38
 /* Constants & Variables */
39
-$current_session_id=api_get_session_id();
39
+$current_session_id = api_get_session_id();
40 40
 //path for pixlr save
41
-$_SESSION['paint_dir']=Security::remove_XSS($dir);
42
-if($_SESSION['paint_dir']=='/'){
43
-    $_SESSION['paint_dir']='';
41
+$_SESSION['paint_dir'] = Security::remove_XSS($dir);
42
+if ($_SESSION['paint_dir'] == '/') {
43
+    $_SESSION['paint_dir'] = '';
44 44
 }
45
-$_SESSION['paint_file']=basename(Security::remove_XSS($file_path));
45
+$_SESSION['paint_file'] = basename(Security::remove_XSS($file_path));
46 46
 
47 47
 $get_file = Security::remove_XSS($file_path);
48 48
 
49 49
 $file = basename($get_file);
50 50
 
51
-$temp_file = explode(".",$file);
52
-$filename=$temp_file[0];
53
-$nameTools = get_lang('EditDocument') . ': '.$filename;
51
+$temp_file = explode(".", $file);
52
+$filename = $temp_file[0];
53
+$nameTools = get_lang('EditDocument').': '.$filename;
54 54
 
55
-$courseDir   = $_course['path'].'/document';
55
+$courseDir = $_course['path'].'/document';
56 56
 
57 57
 $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
58 58
 
@@ -96,15 +96,15 @@  discard block
 block discarded – undo
96 96
 $is_certificate_mode = DocumentManager::is_certificate_mode($dir);
97 97
 
98 98
 if (!$is_certificate_mode)
99
-	$interbreadcrumb[]= array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).'&'.api_get_cidreq(), "name"=> get_lang('Documents'));
99
+	$interbreadcrumb[] = array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).'&'.api_get_cidreq(), "name"=> get_lang('Documents'));
100 100
 else
101
-	$interbreadcrumb[]= array ('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
101
+	$interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
102 102
 
103 103
 // Interbreadcrumb for the current directory root path
104 104
 if (empty($document_data['parents'])) {
105 105
     $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
106 106
 } else {
107
-    foreach($document_data['parents'] as $document_sub_data) {
107
+    foreach ($document_data['parents'] as $document_sub_data) {
108 108
         if ($document_data['title'] == $document_sub_data['title']) {
109 109
             continue;
110 110
         }
@@ -124,33 +124,33 @@  discard block
 block discarded – undo
124 124
 Display :: display_header($nameTools, 'Doc');
125 125
 echo '<div class="actions">';
126 126
 echo '<a href="document.php?id='.$parent_id.'&'.api_get_cidreq().'">'.
127
-    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
127
+    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
128 128
 echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.'&'.api_get_cidreq().'&origin=editpaint">'.
129
-    Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comment'),'',ICON_SIZE_MEDIUM).'</a>';
129
+    Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comment'), '', ICON_SIZE_MEDIUM).'</a>';
130 130
 echo '</div>';
131 131
 
132 132
 ///pixlr
133
-$title=$file;//disk name. No sql name because pixlr return this when save
133
+$title = $file; //disk name. No sql name because pixlr return this when save
134 134
 $pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
135
-$langpixlr  = api_get_language_isocode();
135
+$langpixlr = api_get_language_isocode();
136 136
 $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_translation_table[$langpixlr] : $langpixlr;
137
-$loc=$langpixlr;// deprecated ?? TODO:check pixlr read user browser
137
+$loc = $langpixlr; // deprecated ?? TODO:check pixlr read user browser
138 138
 
139
-$exit_path=api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php';
140
-$_SESSION['exit_pixlr']= Security::remove_XSS($parent_id);
139
+$exit_path = api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php';
140
+$_SESSION['exit_pixlr'] = Security::remove_XSS($parent_id);
141 141
 
142
-$referrer="Chamilo";
142
+$referrer = "Chamilo";
143 143
 
144
-$target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php';
145
-$target=$target_path;
144
+$target_path = api_get_path(WEB_CODE_PATH).'document/save_pixlr.php';
145
+$target = $target_path;
146 146
 
147
-$locktarget="true";
148
-$locktitle="false";
147
+$locktarget = "true";
148
+$locktitle = "false";
149 149
 
150
-if ($_SERVER['HTTP_HOST']=="localhost") {
151
-	$path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml';
150
+if ($_SERVER['HTTP_HOST'] == "localhost") {
151
+	$path_and_file = api_get_path(SYS_PATH).'/crossdomain.xml';
152 152
 	if (!file_exists($path_and_file)) {
153
-		$crossdomain='<?xml version="1.0"?>
153
+		$crossdomain = '<?xml version="1.0"?>
154 154
 			<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
155 155
 			<cross-domain-policy>
156 156
 				<allow-access-from domain="cdn.pixlr.com" />
@@ -159,23 +159,23 @@  discard block
 block discarded – undo
159 159
 			</cross-domain-policy>';//more open domain="*"
160 160
 		@file_put_contents($path_and_file, $crossdomain);
161 161
 	}
162
-	$credentials="true";
162
+	$credentials = "true";
163 163
 }
164 164
 else {
165
-	$credentials="false";
165
+	$credentials = "false";
166 166
 }
167 167
 
168 168
 //make temp images
169
-$temp_folder=api_get_path(SYS_ARCHIVE_PATH).'temp/images';
169
+$temp_folder = api_get_path(SYS_ARCHIVE_PATH).'temp/images';
170 170
 if (!file_exists($temp_folder)) {
171
-    @mkdir($temp_folder, api_get_permissions_for_new_directories(), true);//TODO:check $permissions value, now empty;
171
+    @mkdir($temp_folder, api_get_permissions_for_new_directories(), true); //TODO:check $permissions value, now empty;
172 172
 }
173 173
 
174 174
 //make htaccess with allow from all, and file index.html into temp/images
175
-$htaccess=api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess';
175
+$htaccess = api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess';
176 176
 if (!file_exists($htaccess)) {
177 177
 
178
-	$htaccess_content="order deny,allow\r\nallow from all\r\nOptions -Indexes";
178
+	$htaccess_content = "order deny,allow\r\nallow from all\r\nOptions -Indexes";
179 179
 
180 180
 	$fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess', 'w');
181 181
 	if ($fp) {
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
 	}
185 185
 }
186 186
 
187
-$html_index=api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html';
187
+$html_index = api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html';
188 188
 if (!file_exists($html_index)) {
189
-	$html_index_content="<html><head></head><body></body></html>";
189
+	$html_index_content = "<html><head></head><body></body></html>";
190 190
 	$fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html', 'w');
191 191
 	if ($fp) {
192 192
 		fwrite($fp, $html_index_content);
@@ -195,20 +195,20 @@  discard block
 block discarded – undo
195 195
 }
196 196
 
197 197
 //encript temp name file
198
-$name_crip=sha1(uniqid());//encript
199
-$findext= explode(".", $file);
200
-$extension= $findext[count($findext)-1];
201
-$file_crip=$name_crip.'.'.$extension;
198
+$name_crip = sha1(uniqid()); //encript
199
+$findext = explode(".", $file);
200
+$extension = $findext[count($findext) - 1];
201
+$file_crip = $name_crip.'.'.$extension;
202 202
 
203 203
 //copy file to temp/images directory
204
-$from=$filepath.$file;
205
-$to=api_get_path(SYS_ARCHIVE_PATH).'temp/images/'.$file_crip;
204
+$from = $filepath.$file;
205
+$to = api_get_path(SYS_ARCHIVE_PATH).'temp/images/'.$file_crip;
206 206
 copy($from, $to);
207
-$_SESSION['temp_realpath_image']=$to;
207
+$_SESSION['temp_realpath_image'] = $to;
208 208
 
209 209
 //load image to url
210
-$to_url=api_get_path(WEB_ARCHIVE_PATH).'temp/images/'.$file_crip;
211
-$image=urlencode($to_url);
210
+$to_url = api_get_path(WEB_ARCHIVE_PATH).'temp/images/'.$file_crip;
211
+$image = urlencode($to_url);
212 212
 $pixlr_url = api_get_protocol().'://pixlr.com/editor/?title='.$title.'&image='.$image.'&loc='.$loc.'&referrer='.$referrer.'&target='.$target.'&exit='.$exit_path.'&locktarget='.$locktarget.'&locktitle='.$locktitle.'&credentials='.$credentials;
213 213
 
214 214
 //make frame an send image
Please login to merge, or discard this patch.