Passed
Push — master ( f02a11...57e0bd )
by Vitalii
14:13 queued 13:14
created
html/ops/sample_table_stats.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,25 +27,25 @@
 block discarded – undo
27 27
     row_array(array("Name", "Engine", "Version", "Row Format", "Rows", "Avg Row Length (KB)", "Data Length (MB)", "Max Data Length (MB)", "Index Length (MB)", "Data free (MB)", "Create Time", "Update Time", "Check Time", "Create Options", "Comment"));
28 28
     db_init();
29 29
     $result = _mysql_query("show table status");
30
-    while($row = _mysql_fetch_array($result)) {
30
+    while ($row = _mysql_fetch_array($result)) {
31 31
         $size += ($row["Data_length"] + $row["Index_length"]);
32 32
         $engine = $row["Engine"];
33 33
         //if (!$engine) $engine = $row["Type"];
34 34
         row_array(array(
35 35
             $row["Name"],
36 36
             $engine,
37
-            $row["Version"] ,
38
-            $row["Row_format"] ,
39
-            $row["Rows"] ,
40
-            round($row["Avg_row_length"]/1024,2) ,
41
-            round($row["Data_length"]/(1024*1024),2) ,
42
-            round($row["Max_data_length"]/(1024*1024),2) ,
43
-            round($row["Index_length"]/(1024*1024),2) ,
44
-            round($row["Data_free"]/(1024*1024),2) ,
45
-            $row["Create_time"] ,
46
-            $row["Update_time"] ,
47
-            $row["Check_time"] ,
48
-            $row["Create_options"] ,
37
+            $row["Version"],
38
+            $row["Row_format"],
39
+            $row["Rows"],
40
+            round($row["Avg_row_length"]/1024, 2),
41
+            round($row["Data_length"]/(1024*1024), 2),
42
+            round($row["Max_data_length"]/(1024*1024), 2),
43
+            round($row["Index_length"]/(1024*1024), 2),
44
+            round($row["Data_free"]/(1024*1024), 2),
45
+            $row["Create_time"],
46
+            $row["Update_time"],
47
+            $row["Check_time"],
48
+            $row["Create_options"],
49 49
             $row["Comment"]
50 50
         ));
51 51
     }
Please login to merge, or discard this patch.
html/inc/consent.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 require_once("../inc/boinc_db.inc");
22 22
 require_once("../inc/util.inc");
23 23
 
24
-define('CONSENT_TYPE_ENROLL','ENROLL');
24
+define('CONSENT_TYPE_ENROLL', 'ENROLL');
25 25
 
26 26
 function check_termsofuse() {
27 27
     return defined('TERMSOFUSE_FILE') and file_exists(TERMSOFUSE_FILE);
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
     $source, $ctime = 0
33 33
 ) {
34 34
     $mys = BoincDb::escape_string($source);
35
-    if ($ctime==0) {
35
+    if ($ctime == 0) {
36 36
         $mytime = $user->create_time;
37 37
     } else {
38 38
         $mytime = $ctime;
39 39
     }
40 40
     return BoincConsent::insert(
41
-        "(userid, consent_type_id, consent_time, consent_flag, consent_not_required, source) " .
41
+        "(userid, consent_type_id, consent_time, consent_flag, consent_not_required, source) ".
42 42
         "values($user->id, $consent_type_id, $mytime, $consent_flag, $consent_not_required, '$mys')"
43 43
     );
44 44
 
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 // The integer is the consent_type_id- the id from consent_type table.
64 64
 // If the boolean is FALSE, the integer returned is -1.
65 65
 //
66
-function check_consent_type($name, $checkenabled=TRUE) {
66
+function check_consent_type($name, $checkenabled = TRUE) {
67 67
     $ct = BoincConsentType::lookup("shortname = '{$name}'");
68
-    if ($ct and ( !$checkenabled or ($ct->enabled)) ) {
68
+    if ($ct and (!$checkenabled or ($ct->enabled))) {
69 69
         return array(TRUE, $ct->id);
70 70
     }
71 71
     return array(FALSE, -1);
Please login to merge, or discard this patch.