Completed
Pull Request — 1.11.x (#1661)
by José
27:18
created
plugin/vchamilo/cli/bulkcreatenodes.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 echo "Chamilo Bulk Nodes Creation v.1.0\n";
14 14
 echo "=================================\n";
15 15
 require_once('../../../main/inc/global.inc.php');
16
-require_once('clilib.php');       // cli only functions
16
+require_once('clilib.php'); // cli only functions
17 17
 // Ensure errors are well explained
18 18
 ini_set('debug_display', 1);
19 19
 ini_set('debug_level', E_ALL);
@@ -68,26 +68,26 @@  discard block
 block discarded – undo
68 68
 
69 69
 if (!empty($options['config'])) {
70 70
     echo "Loading config : ".$options['config'];
71
-    if (!file_exists($options['config'])){
71
+    if (!file_exists($options['config'])) {
72 72
         cli_error('Config file mentioned but not found');
73 73
     }
74 74
 
75 75
     $content = file($options['config']);
76
-    foreach($content as $l) {
76
+    foreach ($content as $l) {
77 77
         if (preg_match('/^\s+$/', $l)) continue; // Empty lines.
78 78
         if (preg_match('/^[#\/!;]/', $l)) continue; // Comments (any form).
79 79
         if (preg_match('/^(.*?)=(.*)$/', $l, $matches)) {
80
-            if (in_array($matches[1], $expectedoptions)){
80
+            if (in_array($matches[1], $expectedoptions)) {
81 81
                 $options[trim($matches[1])] = trim($matches[2]);
82 82
             }
83 83
         }
84 84
     }
85 85
 }
86 86
 
87
-require_once($_configuration['root_sys'].'local/classes/database.class.php');       // cli only functions
88
-require_once($_configuration['root_sys'].'local/classes/textlib.class.php');       // cli only functions
89
-require_once($_configuration['root_sys'].'local/classes/mootochamlib.php');       // moodle like API
90
-require_once($_configuration['root_sys'] . '/plugin/vchamilo/lib/vchamilo_plugin.class.php');
87
+require_once($_configuration['root_sys'].'local/classes/database.class.php'); // cli only functions
88
+require_once($_configuration['root_sys'].'local/classes/textlib.class.php'); // cli only functions
89
+require_once($_configuration['root_sys'].'local/classes/mootochamlib.php'); // moodle like API
90
+require_once($_configuration['root_sys'].'/plugin/vchamilo/lib/vchamilo_plugin.class.php');
91 91
 
92 92
 global $DB;
93 93
 if ($options['verbose']) echo "building database manager\n";
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 // Get main admin for further replacement.
118 118
 $admin = $DB->get_record('user', array('username' => 'admin'));
119 119
 
120
-foreach($nodes as $data) {
120
+foreach ($nodes as $data) {
121 121
 
122 122
     ctrace('Making node '.$data->root_web);
123 123
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 $settingrec->access_url = 1;
164 164
                 $settingrec->selected_value = $value;
165 165
                 ctrace("Setting up {$settingrec->variable}|{$settingrec->subkey} to $value\n");
166
-                if ($oldrec = $NDB->get_record('settings_current', array('variable' => $settingrec->variable, 'subkey' => $settingrec->subkey, 'type' => $settingrec->type))){
166
+                if ($oldrec = $NDB->get_record('settings_current', array('variable' => $settingrec->variable, 'subkey' => $settingrec->subkey, 'type' => $settingrec->type))) {
167 167
                     $settingrec->id = $oldrec->id;
168 168
                     $NDB->update_record('settings_current', $settingrec, 'id');
169 169
                 } else {
@@ -208,9 +208,9 @@  discard block
 block discarded – undo
208 208
     
209 209
     if ($interactive) {
210 210
         $input = readline("Continue (y/n|r) ?\n");
211
-        if ($input == 'r' || $input == 'R'){
211
+        if ($input == 'r' || $input == 'R') {
212 212
             // do nothing, just continue
213
-        } elseif ($input == 'n' || $input == 'N'){
213
+        } elseif ($input == 'n' || $input == 'N') {
214 214
             echo "finishing\n";
215 215
             exit;
216 216
         }
Please login to merge, or discard this patch.
plugin/vchamilo/cli/cron.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
 $CLI_VCHAMILO_PRECHECK = true; // force first config to be minimal
24 24
 require(dirname(dirname(dirname(dirname(__FILE__)))).'/main/inc/conf/configuration.php'); // get boot config
25
-require_once($_configuration['root_sys'].'plugin/vchamilo/cli/clilib.php');       // cli only functions
25
+require_once($_configuration['root_sys'].'plugin/vchamilo/cli/clilib.php'); // cli only functions
26 26
 
27 27
 // Ensure errors are well explained
28 28
 
Please login to merge, or discard this patch.
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.