Completed
Push — 1.11.x ( c71691...461f0c )
by José
73:17 queued 37:23
created
main/glossary/glossary_ajax_request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $glossary_all_data = implode('[|.|_|.|-|.|]', $glossary_all_data);
42 42
         echo api_xml_http_response_encode($glossary_all_data);
43 43
     }
44
-} elseif(isset($_POST['glossary_name'])) {
44
+} elseif (isset($_POST['glossary_name'])) {
45 45
     $my_glossary_name = Security::remove_XSS($_POST['glossary_name']);
46 46
     $my_glossary_name = api_convert_encoding($my_glossary_name, $charset, 'UTF-8');
47 47
     $my_glossary_name = trim($my_glossary_name);
Please login to merge, or discard this patch.
plugin/vchamilo/views/manage.testdatapath.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $dataroot = $_REQUEST['dataroot'];
24 24
 
25 25
 $absalternatecourse = vchamilo_get_config('vchamilo', 'course_real_root');
26
-if (!empty($absalternatecourse)){
26
+if (!empty($absalternatecourse)) {
27 27
     // this is the relocated case
28 28
     $coursedir = str_replace('//', '/', $absalternatecourse.'/'.$dataroot);
29 29
 } else {
Please login to merge, or discard this patch.
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/clilib.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@  discard block
 block discarded – undo
5 5
 * @param string $location 
6 6
 *
7 7
 */
8
-function vchamilo_parse_csv_nodelist($nodelistlocation = '', $plugin = null){
8
+function vchamilo_parse_csv_nodelist($nodelistlocation = '', $plugin = null) {
9 9
     global $_configuration;
10 10
     
11 11
     $vnodes = array();
12 12
     
13
-    if (empty($nodelistlocation)){
13
+    if (empty($nodelistlocation)) {
14 14
         $nodelistlocation = $_configuratioh['root_sys'].'/plugin/vchamilo/nodelist.csv';
15 15
     }
16 16
     
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     // Jump any empty or comment line
69 69
     $text = fgets($fp, 1024);
70 70
     $i = 0;
71
-    while(vchamilo_is_empty_line_or_format($text, $i == 0)){
71
+    while (vchamilo_is_empty_line_or_format($text, $i == 0)) {
72 72
         $text = fgets($fp, 1024);
73 73
         $i++;
74 74
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     // Check for valid field names
79 79
     foreach ($headers as $h) {
80 80
         $header[] = trim($h); 
81
-        $patternized = implode('|', $patterns) . "\\d+";
81
+        $patternized = implode('|', $patterns)."\\d+";
82 82
         $metapattern = implode('|', $metas);
83 83
         if (!(isset($required[$h]) ||
84 84
                 isset($optionalDefaults[$h]) ||
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     $linenum = 2; // Since header is line 1.
108 108
 
109 109
     // Take some from admin profile, other fixed by hardcoded defaults.
110
-    while (!feof ($fp)) {
110
+    while (!feof($fp)) {
111 111
 
112 112
         // Make a new base record.
113 113
         $vnode = new StdClass();
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
  * @param bool $casesensitive true if options are case sensitive
195 195
  * @return string entered text
196 196
  */
197
-function cli_input($prompt, $default='', array $options=null, $casesensitiveoptions=false) {
197
+function cli_input($prompt, $default = '', array $options = null, $casesensitiveoptions = false) {
198 198
     echo $prompt;
199 199
     echo "\n: ";
200 200
     $input = fread(STDIN, 2048);
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
  * @param array $shortmapping array describing mapping of short to long style options ex:('h'=>'help', 'v'=>'verbose')
221 221
  * @return array array of arrays, options, unrecognised as optionlongname=>value
222 222
  */
223
-function cli_get_params(array $longoptions, array $shortmapping=null) {
224
-    $shortmapping = (array)$shortmapping;
223
+function cli_get_params(array $longoptions, array $shortmapping = null) {
224
+    $shortmapping = (array) $shortmapping;
225 225
     $options      = array();
226 226
     $unrecognized = array();
227 227
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
  * @param bool $return false means print, true return as string
291 291
  * @return mixed void or string
292 292
  */
293
-function cli_separator($return=false) {
293
+function cli_separator($return = false) {
294 294
     $separator = str_repeat('-', 79)."\n";
295 295
     if ($return) {
296 296
         return $separator;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
  * @param bool $return false means print, true return as string
306 306
  * @return mixed void or string
307 307
  */
308
-function cli_heading($string, $return=false) {
308
+function cli_heading($string, $return = false) {
309 309
     $string = "== $string ==\n";
310 310
     if ($return) {
311 311
         return $string;
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/vchamilo/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,6 +57,6 @@
 block discarded – undo
57 57
 
58 58
 // create root storage directory for templates
59 59
 global $_configuration;
60
-if (!is_dir($_configuration['root_sys'].'plugin/vchamilo/templates')){
60
+if (!is_dir($_configuration['root_sys'].'plugin/vchamilo/templates')) {
61 61
     mkdir($_configuration['root_sys'].'plugin/vchamilo/templates', 0777, true);
62 62
 }
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/plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.