Passed
Push — 1.10.x ( 5654d2...115d5a )
by Yannick
263:14 queued 212:07
created
main/cron/user_import/get_data_from_mail.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This script gets users details of a given list of users
4
- * (given by e-mail) and prints the details in /tmp/list.txt
5
- * To enable script, prefix the first die(); with //
6
- * @package chamilo.cron.user_import
7
- */
3
+     * This script gets users details of a given list of users
4
+     * (given by e-mail) and prints the details in /tmp/list.txt
5
+     * To enable script, prefix the first die(); with //
6
+     * @package chamilo.cron.user_import
7
+     */
8 8
 /**
9
- * Initialization
10
- */
9
+     * Initialization
10
+     */
11 11
 /* Example of input file:
12 12
 [email protected]
13 13
 [email protected]
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
20 20
 $users = Database::get_main_table(TABLE_MAIN_USER);
21 21
 $string='';
22 22
 foreach ($list as $mail) {
23
-  $mail = trim($mail);
24
-  $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n";
25
-  $res = Database::query($sql);
26
-  if ($res === false) { die(mysql_error());}
27
-  if (Database::num_rows($res) == 0) {
23
+    $mail = trim($mail);
24
+    $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n";
25
+    $res = Database::query($sql);
26
+    if ($res === false) { die(mysql_error());}
27
+    if (Database::num_rows($res) == 0) {
28 28
     $string .= 'No encontrado;'.$row['email'];
29
-  } else {
29
+    } else {
30 30
     $row = Database::fetch_assoc($res);
31
-   $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n";
32
-  }
31
+    $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n";
32
+    }
33 33
 }
34 34
 echo $string;
35 35
 file_put_contents('/tmp/list.txt',$string);
Please login to merge, or discard this patch.
main/cron/create_course_sessions.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Create course sessions procedure. It creates sessions for courses that haven't it yet.
5
- * If today is greater than OFFSET, it will create them also for the next quarter
6
- * @package chamilo.cron
7
- * @author Imanol Losada <[email protected]>
8
- */
4
+     * Create course sessions procedure. It creates sessions for courses that haven't it yet.
5
+     * If today is greater than OFFSET, it will create them also for the next quarter
6
+     * @package chamilo.cron
7
+     * @author Imanol Losada <[email protected]>
8
+     */
9 9
 
10 10
 /**
11 11
  * Initialization
Please login to merge, or discard this patch.
main/cron/lang/langstats.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,80 +1,80 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * This script prints a list of most used language terms. The registration of
5
- * frequency for language variables is a very heavy operation. 
6
- * To enable, add "$_configuration['language_measure_frequency' ] = 1;" at the
7
- * end of main/inc/conf/configuration.php. Remove when done.
8
- * Add ?output=1 to the URL to generate languag files in /tmp/lang/ with just
9
- * the number of terms you want.
10
- */
4
+     * This script prints a list of most used language terms. The registration of
5
+     * frequency for language variables is a very heavy operation. 
6
+     * To enable, add "$_configuration['language_measure_frequency' ] = 1;" at the
7
+     * end of main/inc/conf/configuration.php. Remove when done.
8
+     * Add ?output=1 to the URL to generate languag files in /tmp/lang/ with just
9
+     * the number of terms you want.
10
+     */
11 11
 /**
12
- * Requires
13
- */
12
+     * Requires
13
+     */
14 14
 die();
15 15
 require_once '../../inc/global.inc.php';
16 16
 require_once 'langstats.class.php';
17 17
 /**
18
- * Init
19
- */
18
+     * Init
19
+     */
20 20
 $terms_limit = 10000 + 50;
21 21
 $x_most_popular = 2000;
22 22
 $output = false;
23 23
 $ls = new langstats();
24 24
 if ($ls === false) {
25
-  exit($ls->error);
25
+    exit($ls->error);
26 26
 }
27 27
 $list = $ls->get_popular_terms($x_most_popular);
28 28
 if ($_GET['output'] == 1) {
29
-  $output = true;
30
-  $variables_origin = $ls->get_variables_origin();
29
+    $output = true;
30
+    $variables_origin = $ls->get_variables_origin();
31 31
 }
32 32
 /**
33
- * Display
34
- */
33
+     * Display
34
+     */
35 35
 if (count($list)==0) { echo 'No terms loaded so far'; }
36 36
 if (count($list)>0) {
37
-  $i = 1;
38
-  $j = 1;
39
-  $k = 0;
40
-  $files = array();
41
-  $trans = array();
42
-  echo 'Number of records: '.count($list).'<br />';
43
-  echo '<table><tr><th>Index</th><th>Registration order</th><th>Term</th>'.($output==1?'<th>Origin</th>':'').'<th>Count</th></tr>';
44
-  foreach($list as $elem) {
37
+    $i = 1;
38
+    $j = 1;
39
+    $k = 0;
40
+    $files = array();
41
+    $trans = array();
42
+    echo 'Number of records: '.count($list).'<br />';
43
+    echo '<table><tr><th>Index</th><th>Registration order</th><th>Term</th>'.($output==1?'<th>Origin</th>':'').'<th>Count</th></tr>';
44
+    foreach($list as $elem) {
45 45
     if ($k > $terms_limit) { break; }
46 46
     $fixed_elem = $elem;
47 47
     if ($output) {
48
-      if (empty($variables_origin[$elem['term_name']]) && !empty($variables_origin['lang'.$elem['term_name']])) {
48
+        if (empty($variables_origin[$elem['term_name']]) && !empty($variables_origin['lang'.$elem['term_name']])) {
49 49
         $fixed_elem = array('id' => $elem['id'], 'term_name' => 'lang'.$elem['term_name'], 'term_count' => $elem['term_count']);
50
-      }
51
-      if (empty($variables_origin[$fixed_elem['term_name']])) {
50
+        }
51
+        if (empty($variables_origin[$fixed_elem['term_name']])) {
52 52
         continue; 
53
-      }
54
-      $files[$variables_origin[$fixed_elem['term_name']]][] = $fixed_elem['term_name'];
55
-      $translation = get_lang($fixed_elem['term_name']);
56
-      $k += str_word_count($translation);
57
-      $trans[$fixed_elem['term_name']] = $translation;
58
-      $j++;
53
+        }
54
+        $files[$variables_origin[$fixed_elem['term_name']]][] = $fixed_elem['term_name'];
55
+        $translation = get_lang($fixed_elem['term_name']);
56
+        $k += str_word_count($translation);
57
+        $trans[$fixed_elem['term_name']] = $translation;
58
+        $j++;
59 59
     }
60 60
     echo '<tr><td>',$i,
61
-      '</td><td>',$fixed_elem['id'],
62
-      '</td><td>',$fixed_elem['term_name'];
61
+        '</td><td>',$fixed_elem['id'],
62
+        '</td><td>',$fixed_elem['term_name'];
63 63
     if ($output) {
64
-      echo '</td><td>'.$variables_origin[$fixed_elem['term_name']];
64
+        echo '</td><td>'.$variables_origin[$fixed_elem['term_name']];
65 65
     }
66 66
     echo '</td><td>',$fixed_elem['term_count'],'</td></tr>';
67 67
     $i++;
68
-  }
69
-  echo '</table>';
70
-  if ($output) {
68
+    }
69
+    echo '</table>';
70
+    if ($output) {
71 71
     @mkdir('/tmp/lang');
72 72
     foreach ($files as $file => $terms) {
73
-      @touch('/tmp/lang/'.$file);
74
-      file_put_contents('/tmp/lang/'.$file,"<?php".PHP_EOL);
75
-      foreach ($terms as $term) {
73
+        @touch('/tmp/lang/'.$file);
74
+        file_put_contents('/tmp/lang/'.$file,"<?php".PHP_EOL);
75
+        foreach ($terms as $term) {
76 76
         file_put_contents('/tmp/lang/'.$file,'$'.$term.' = "'.str_replace('"','\"',$trans[$term]).'";'.PHP_EOL, FILE_APPEND);
77
-      }
77
+        }
78 78
     }  
79
-  }
79
+    }
80 80
 }
Please login to merge, or discard this patch.
main/cron/lang/list_undefined_langvars.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,25 +1,25 @@  discard block
 block discarded – undo
1 1
 <?php /* For licensing terms, see /license.txt */
2 2
 /**
3
- * Cron script to list used, but undefined, language variables
4
- * @package chamilo.cron
5
- */
3
+     * Cron script to list used, but undefined, language variables
4
+     * @package chamilo.cron
5
+     */
6 6
 /**
7
- * Includes and declarations
8
- */
7
+     * Includes and declarations
8
+     */
9 9
 die();
10 10
 require_once '../../inc/global.inc.php';
11 11
 $path = api_get_path(SYS_LANG_PATH).'english';
12 12
 ini_set('memory_limit','128M');
13 13
 /**
14
- * Main code
15
- */
14
+     * Main code
15
+     */
16 16
 $terms = array();
17 17
 $list = SubLanguageManager::get_lang_folder_files_list($path);
18 18
 foreach ($list as $entry) {
19 19
     $file = $path.'/'.$entry;
20 20
     if (is_file($file)) {
21 21
         $terms = array_merge($terms,SubLanguageManager::get_all_language_variable_in_file($file,true));
22
-	}
22
+    }
23 23
 }
24 24
 // get only the array keys (the language variables defined in language files)
25 25
 $defined_terms = array_flip(array_keys($terms));
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 foreach ($files as $file) {
33 33
     //echo 'Analyzing '.$file."<br />";
34 34
     $shortfile = substr($file,$l);
35
-	$lines = file($file);
35
+    $lines = file($file);
36 36
     foreach ($lines as $line) {
37
-    	$myterms = array();
37
+        $myterms = array();
38 38
         $res = preg_match_all('/get_lang\(\'(\\w*)\'\)/',$line,$myterms);
39 39
         if ($res > 0) {
40 40
             foreach($myterms[1] as $term) {
41 41
                 if (!isset($defined_terms[$term]) && !isset($defined_terms['lang'.$term])) {
42
-                	$undefined_terms[$term] = $shortfile;
42
+                    $undefined_terms[$term] = $shortfile;
43 43
                     //echo "Undefined: $term<br />";
44 44
                 }
45 45
             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if ($res > 0) {
50 50
             foreach($myterms[1] as $term) {
51 51
                 if (!isset($defined_terms[$term]) && !isset($defined_terms['lang'.$term])) {
52
-                	$undefined_terms[$term] = $shortfile;
52
+                    $undefined_terms[$term] = $shortfile;
53 53
                     //echo "Undefined: $term<br />";
54 54
                 }
55 55
             }
@@ -73,17 +73,17 @@  discard block
 block discarded – undo
73 73
     $list = scandir($base_path);
74 74
     $files = array();
75 75
     foreach ($list as $item) {
76
-    	if (substr($item,0,1)=='.') {continue;}
76
+        if (substr($item,0,1)=='.') {continue;}
77 77
         $special_dirs = array(api_get_path(SYS_TEST_PATH),api_get_path(SYS_COURSE_PATH),api_get_path(SYS_LANG_PATH),api_get_path(SYS_ARCHIVE_PATH));
78 78
         if (in_array($base_path.$item.'/',$special_dirs)) {continue;}
79 79
         if (is_dir($base_path.$item)) {
80
-        	$files = array_merge($files,get_all_php_files($base_path.$item.'/'));
80
+            $files = array_merge($files,get_all_php_files($base_path.$item.'/'));
81 81
         } else {
82 82
             //only analyse php files
83 83
                 $sub = substr($item,-4);
84
-        	if ($sub == '.php' or $sub == '.tpl') {
84
+            if ($sub == '.php' or $sub == '.tpl') {
85 85
                     $files[] = $base_path.$item;
86
-        	}
86
+            }
87 87
         }
88 88
     }
89 89
     $list = null;
Please login to merge, or discard this patch.
main/cron/lang/check_parse_lang.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1 1
 <?php /* For licensing terms, see /license.txt */
2 2
 /**
3
- * Cron script to list unused, but defined, language variables
4
- * @package chamilo.cron.lang
5
- */
3
+     * Cron script to list unused, but defined, language variables
4
+     * @package chamilo.cron.lang
5
+     */
6 6
 /**
7
- * Includes and declarations
8
- */
7
+     * Includes and declarations
8
+     */
9 9
 //die();
10 10
 require_once '../../inc/global.inc.php';
11 11
 $path = api_get_path(SYS_LANG_PATH).'english';
12 12
 ini_set('memory_limit','128M');
13 13
 /**
14
- * Main code
15
- */
14
+     * Main code
15
+     */
16 16
 $terms = array();
17 17
 $list = SubLanguageManager::get_lang_folder_files_list($path);
18 18
 $langs = scandir(api_get_path(SYS_LANG_PATH));
19 19
 foreach ($langs as $lang) {
20
-  $dir = api_get_path(SYS_LANG_PATH).$lang;
21
-  if (is_dir($dir) && substr($lang,0,1) != '.' && !empty($lang)) {
20
+    $dir = api_get_path(SYS_LANG_PATH).$lang;
21
+    if (is_dir($dir) && substr($lang,0,1) != '.' && !empty($lang)) {
22 22
     echo "$lang...";
23 23
     $ok = true;
24 24
     foreach ($list as $entry) {
25
-      $file = $dir.'/'.$entry;
26
-      $out = array();
27
-      if (is_file($file)) {
25
+        $file = $dir.'/'.$entry;
26
+        $out = array();
27
+        if (is_file($file)) {
28 28
         //$terms = array_merge($terms,SubLanguageManager::get_all_language_variable_in_file($file,true));
29 29
         @exec('php5 -l '.$file,$out);
30 30
         if (substr($out[0],0,2)!='No') {
31
-          echo $out[0]."\n";
32
-          $ok = false;
31
+            echo $out[0]."\n";
32
+            $ok = false;
33
+        }
33 34
         }
34
-      }
35 35
     }
36 36
     if ($ok) {
37
-      echo "OK\n";
37
+        echo "OK\n";
38
+    }
38 39
     }
39
-  }
40 40
 }
41 41
 echo "Done\n";
Please login to merge, or discard this patch.
main/cron/lang/langstats_file_builder.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * This script generates a directory based on the English language variables
5
- * but only composed of the 10,000 (can be configured) most frequent words
6
- * used in Chamilo. This implies first using the langstats.php script, which
7
- * in turn implies configuring an additional variable in configuration.php
8
- * (see langstats.php for more info).
9
- * When running the language_builder, please make sure this parameter is
10
- * set to 0 in the configuration.php file, otherwise it will take *ages*.
11
- */
4
+     * This script generates a directory based on the English language variables
5
+     * but only composed of the 10,000 (can be configured) most frequent words
6
+     * used in Chamilo. This implies first using the langstats.php script, which
7
+     * in turn implies configuring an additional variable in configuration.php
8
+     * (see langstats.php for more info).
9
+     * When running the language_builder, please make sure this parameter is
10
+     * set to 0 in the configuration.php file, otherwise it will take *ages*.
11
+     */
12 12
 /**
13
- * Requires
14
- */
13
+     * Requires
14
+     */
15 15
 require_once '../../inc/global.inc.php';
16 16
 require_once 'langstats.class.php'; 
17 17
 global $_configuration;
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 $langstats = new langstats();
20 20
 $orig_lang = 'english';
21 21
 /**
22
- * Init
23
- */
22
+     * Init
23
+     */
24 24
 $words_limit = 10000; //change this if you want more words
25 25
 $terms_limit = 3000; //change this if you think you'll need more terms
26 26
 $terms = $langstats->get_popular_terms($terms_limit);
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
 $lang_dir = api_get_path(SYS_LANG_PATH);
31 31
 $arch_dir = api_get_path(SYS_ARCHIVE_PATH);
32 32
 /**
33
- * Code run
34
- */
33
+     * Code run
34
+     */
35 35
 foreach ($terms as $row) {
36
-  if ($words_counter > 10000) { break; }
37
-  $words = str_word_count(get_lang($row['term_name'],null,$orig_lang));
38
-  $words_counter += $words;
39
-  $terms_in_limit[$row['term_name']] = $i;
40
-  //echo "Term <b>".$row['term_name']."</b> is <b>'".get_lang($row['term_name'],null,$orig_lang)."'</b> which means $words words<br /><br />\n";
41
-  //if ($words_counter%1000 >= 0) {
36
+    if ($words_counter > 10000) { break; }
37
+    $words = str_word_count(get_lang($row['term_name'],null,$orig_lang));
38
+    $words_counter += $words;
39
+    $terms_in_limit[$row['term_name']] = $i;
40
+    //echo "Term <b>".$row['term_name']."</b> is <b>'".get_lang($row['term_name'],null,$orig_lang)."'</b> which means $words words<br /><br />\n";
41
+    //if ($words_counter%1000 >= 0) {
42 42
     //echo "Reached $words_counter words at term $i (".$row['term_name']." used ".$row['term_count']." times)...<br />\n";
43
-  //}
44
-  $i++;
43
+    //}
44
+    $i++;
45 45
 }
46 46
 //echo $words_counter.'<br />';
47 47
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 echo "Scanning English files, trying to find these terms...<br />\n";
51 51
 if (!is_dir($arch_dir.'/langstats')) {
52
-  mkdir($arch_dir.'/langstats');
53
-  mkdir($arch_dir.'/langstats/'.$orig_lang);
52
+    mkdir($arch_dir.'/langstats');
53
+    mkdir($arch_dir.'/langstats/'.$orig_lang);
54 54
 }
55 55
 $list_files = scandir($lang_dir.'/'.$orig_lang);
56 56
 $j = 1;
@@ -59,41 +59,41 @@  discard block
 block discarded – undo
59 59
 $global_var = array(); //keep the combination of all vars
60 60
 $terms_in_limit = array_flip($terms_in_limit);
61 61
 foreach ($list_files as $file) {
62
-  if (substr($file,0,1) == '.') {continue;}
63
-  //echo "'".substr($file,0,-8)."',<br />"; //print in a PHP array format
64
-  $vars = file($lang_dir.'/'.$orig_lang.'/'.$file);
65
-  $local_var = array();
66
-  $file_string = '<?php'."\n";
67
-  foreach ($vars as $line) {
62
+    if (substr($file,0,1) == '.') {continue;}
63
+    //echo "'".substr($file,0,-8)."',<br />"; //print in a PHP array format
64
+    $vars = file($lang_dir.'/'.$orig_lang.'/'.$file);
65
+    $local_var = array();
66
+    $file_string = '<?php'."\n";
67
+    foreach ($vars as $line) {
68 68
     $var = array();
69 69
     $res = preg_match('/^(\$\w*)/',$line,$var);
70 70
     if ($res>0) {
71
-      //echo $var[1]."<br />";
71
+        //echo $var[1]."<br />";
72 72
       
73
-      if (in_array(substr($var[1],1),$terms_in_limit)) {
73
+        if (in_array(substr($var[1],1),$terms_in_limit)) {
74 74
         //echo "Var ".$var[1]." was in the limit<br />";
75 75
         $local_var[$var[1]] = $line;
76 76
         $file_string .= $line;
77 77
         $terms_found[] = substr($var[1],1); //e.g. store Tools
78 78
         $words_found += str_word_count(get_lang($var[1],null,$orig_lang));
79
-      } elseif (in_array(substr($var[1],5),$terms_in_limit)) {
79
+        } elseif (in_array(substr($var[1],5),$terms_in_limit)) {
80 80
         //echo "Var ".$var[1]." was in the limit<br />";
81 81
         $local_var[$var[1]] = $line;
82 82
         $file_string .= $line;
83 83
         $terms_found[] = substr($var[1],5); //e.g. store langTools
84 84
         $words_found += str_word_count(get_lang(substr($var[1],5),null,$orig_lang));
85
-      } //else do not care
85
+        } //else do not care
86 86
     }
87
-  }
88
-  echo "Writing ".$arch_dir.'/langstats/'.$orig_lang.'/'.$file."<br />\n";
89
-  file_put_contents($arch_dir.'/langstats/'.$orig_lang.'/'.$file,$file_string); 
90
-  $global_var += $local_var;
87
+    }
88
+    echo "Writing ".$arch_dir.'/langstats/'.$orig_lang.'/'.$file."<br />\n";
89
+    file_put_contents($arch_dir.'/langstats/'.$orig_lang.'/'.$file,$file_string); 
90
+    $global_var += $local_var;
91 91
 };
92 92
 $terms_diff = count($global_var)-count($terms_in_limit);
93 93
 echo count($global_var)." terms found in English files (summing up to $words_found words). Some terms ($terms_diff in this case) might have appeared in two different files<br />";
94 94
 /**
95
- * Display results
96
- */
95
+     * Display results
96
+     */
97 97
 
98 98
 echo "Difference between filtered and found in English:<br />";
99 99
 //print_r($terms_found);
Please login to merge, or discard this patch.
main/cron/lang/list_unused_langvars.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php /* For licensing terms, see /license.txt */
2 2
 /**
3
- * Cron script to list unused, but defined, language variables
4
- * @package chamilo.cron.lang
5
- */
3
+     * Cron script to list unused, but defined, language variables
4
+     * @package chamilo.cron.lang
5
+     */
6 6
 /**
7
- * Includes and declarations
8
- */
7
+     * Includes and declarations
8
+     */
9 9
 die();
10 10
 require_once '../../inc/global.inc.php';
11 11
 $path = api_get_path(SYS_LANG_PATH).'english';
12 12
 ini_set('memory_limit', '128M');
13 13
 /**
14
- * Main code
15
- */
14
+     * Main code
15
+     */
16 16
 $terms = array();
17 17
 $list = SubLanguageManager::get_lang_folder_files_list($path);
18 18
 foreach ($list as $entry) {
@@ -68,18 +68,18 @@  discard block
 block discarded – undo
68 68
 // defined terms, and this should prove the concept that there are much
69 69
 // more variables than what we really use
70 70
 if (count($usedTerms)<1) {
71
-  die("No used terms<br />\n");
71
+    die("No used terms<br />\n");
72 72
 } else {
73
-  echo "The following terms were defined but never used: <br />\n<table>";
73
+    echo "The following terms were defined but never used: <br />\n<table>";
74 74
 }
75 75
 $i = 1;
76 76
 foreach ($defined_terms as $term => $file) {
77
-  // remove "lang" prefix just in case
78
-  if (substr($term,0,4)=='lang') { $term = substr($term,4); }
79
-  if (!isset($usedTerms[$term])) {
77
+    // remove "lang" prefix just in case
78
+    if (substr($term,0,4)=='lang') { $term = substr($term,4); }
79
+    if (!isset($usedTerms[$term])) {
80 80
     echo "<tr><td>$i</td><td>$term</td></tr>\n";
81 81
     $i++;
82
-  }
82
+    }
83 83
 }
84 84
 echo "</table>\n";
85 85
 
@@ -88,17 +88,17 @@  discard block
 block discarded – undo
88 88
     $list = scandir($base_path);
89 89
     $files = array();
90 90
     foreach ($list as $item) {
91
-    	if (substr($item,0,1)=='.') {continue;}
91
+        if (substr($item,0,1)=='.') {continue;}
92 92
         $special_dirs = array(api_get_path(SYS_TEST_PATH),api_get_path(SYS_COURSE_PATH),api_get_path(SYS_LANG_PATH),api_get_path(SYS_ARCHIVE_PATH));
93 93
         if (in_array($base_path.$item.'/',$special_dirs)) {continue;}
94 94
         if (is_dir($base_path.$item)) {
95
-        	$files = array_merge($files,get_all_php_files($base_path.$item.'/'));
95
+            $files = array_merge($files,get_all_php_files($base_path.$item.'/'));
96 96
         } else {
97 97
             //only analyse php files
98 98
                 $sub = substr($item,-4);
99
-        	if ($sub == '.php' or $sub == '.tpl') {
99
+            if ($sub == '.php' or $sub == '.tpl') {
100 100
                     $files[] = $base_path.$item;
101
-        	}
101
+            }
102 102
         }
103 103
     }
104 104
     $list = null;
Please login to merge, or discard this patch.
main/cron/fix_online_time.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Automatic fix online time procedure. If a COURSEMANAGER has been idle for $timeLimit
5
- * or more then the procedure adds $extraTime to his logout_course_date.
6
- * @package chamilo.cron
7
- * @author Imanol Losada <[email protected]>
8
- */
4
+     * Automatic fix online time procedure. If a COURSEMANAGER has been idle for $timeLimit
5
+     * or more then the procedure adds $extraTime to his logout_course_date.
6
+     * @package chamilo.cron
7
+     * @author Imanol Losada <[email protected]>
8
+     */
9 9
 require_once __DIR__ . '/../inc/global.inc.php';
10 10
 
11 11
 /**
Please login to merge, or discard this patch.
main/cron/run.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This script should be called by a properly set cron process on your server.
4
- * For more information, check the installation guide in the documentation 
5
- * folder. 
6
- * Add your own executable scripts below the inclusion of notification.php
7
- * @package chamilo.cron
8
- */
3
+     * This script should be called by a properly set cron process on your server.
4
+     * For more information, check the installation guide in the documentation 
5
+     * folder. 
6
+     * Add your own executable scripts below the inclusion of notification.php
7
+     * @package chamilo.cron
8
+     */
9 9
 /**
10
- * Settings that will influence the execution of the cron tasks
11
- */
10
+     * Settings that will influence the execution of the cron tasks
11
+     */
12 12
 //ini_set('max_execution_time',300); //authorize execution for up to 5 minutes
13 13
 //ini_set('memory_limit','100M'); //authorize script to use up to 100M RAM 
14 14
 /**
15
- * Included cron-ed tasks. You might want to turn error-logging off by 
16
- * commenting the first and last line of this section.
17
- */
15
+     * Included cron-ed tasks. You might want to turn error-logging off by 
16
+     * commenting the first and last line of this section.
17
+     */
18 18
 error_log('[chamilo][cronjob] Starting cron jobs as process '.getmypid());
19 19
 require_once 'notification.php';
20 20
 error_log('[chamilo][cronjob] Ending cron jobs of process '.getmypid());
Please login to merge, or discard this patch.