Completed
Pull Request — master (#2571)
by Christian
11:55
created
html/user/forum_user_posts.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
         if ($forum->parent_type == 1) {
90 90
             // post to team msg board
91 91
             if ($forum->category == $teamid) {
92
-				if ($thread->hidden && !$show_team_hidden) {
93
-					continue;
94
-				}
92
+                if ($thread->hidden && !$show_team_hidden) {
93
+                    continue;
94
+                }
95 95
                 if ($post->hidden && !$show_team_hidden) {
96 96
                     continue;
97 97
                 }
@@ -99,18 +99,18 @@  discard block
 block discarded – undo
99 99
                 continue;
100 100
             }
101 101
         } else {
102
-			if ($thread->hidden && !$show_hidden) {
103
-				continue;
104
-			}
102
+            if ($thread->hidden && !$show_hidden) {
103
+                continue;
104
+            }
105 105
             if ($post->hidden && !$show_hidden) {
106 106
                 continue;
107 107
             }
108 108
         }
109 109
     }
110
-	if ($n == $offset + $items_per_page) {
111
-		$show_next = true;
112
-		break;
113
-	}
110
+    if ($n == $offset + $items_per_page) {
111
+        $show_next = true;
112
+        break;
113
+    }
114 114
     if ($n >= $offset) {
115 115
         show_post_and_context($post, $thread, $forum, $options, $n+1);
116 116
     }
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 echo "</table><br><br>\n";
120 120
 
121 121
 if ($offset) {
122
-	$x = $offset - $items_per_page;
122
+    $x = $offset - $items_per_page;
123 123
     echo "<a href=forum_user_posts.php?userid=$userid&offset=$x>
124 124
 		<b>".tra("Previous %1", $items_per_page)."</b>
125 125
 		</a>
126 126
     ";
127
-	if ($show_next) echo " &middot; ";
127
+    if ($show_next) echo " &middot; ";
128 128
 }
129 129
 
130 130
 if ($show_next) {
Please login to merge, or discard this patch.
html/user/openid.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 class LightOpenID
48 48
 {
49 49
     public $returnUrl
50
-         , $required = array()
51
-         , $optional = array()
52
-         , $verify_peer = null
53
-         , $capath = null
54
-         , $cainfo = null;
50
+            , $required = array()
51
+            , $optional = array()
52
+            , $verify_peer = null
53
+            , $capath = null
54
+            , $cainfo = null;
55 55
     private $identity, $claimed_id;
56 56
     protected $server, $version, $trustRoot, $aliases, $identifier_select = false
57 57
             , $ax = false, $sreg = false, $data, $setup_url = null;
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
                         $parsed_url = parse_url($this->claimed_id);
262 262
                         $this->identity =
263 263
                         $this->claimed_id = $parsed_url['scheme'] . '://'
264
-                                          . $parsed_url['host']
265
-                                          . $headers[$name];
264
+                                            . $parsed_url['host']
265
+                                            . $headers[$name];
266 266
                     }
267 267
                 }
268 268
             }
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
 
302 302
         $url = $parts + $url;
303 303
         $url = $url['scheme'] . '://'
304
-             . (empty($url['username'])?''
304
+                . (empty($url['username'])?''
305 305
                  :(empty($url['password'])? "{$url['username']}@"
306 306
                  :"{$url['username']}:{$url['password']}@"))
307
-             . $url['host']
308
-             . (empty($url['port'])?'':":{$url['port']}")
309
-             . (empty($url['path'])?'':$url['path'])
310
-             . (empty($url['query'])?'':"?{$url['query']}")
311
-             . (empty($url['fragment'])?'':"#{$url['fragment']}");
307
+                . $url['host']
308
+                . (empty($url['port'])?'':":{$url['port']}")
309
+                . (empty($url['path'])?'':$url['path'])
310
+                . (empty($url['query'])?'':"?{$url['query']}")
311
+                . (empty($url['fragment'])?'':"#{$url['fragment']}");
312 312
         return $url;
313 313
     }
314 314
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 
534 534
     protected function authUrl_v1($immediate)
535 535
     {
536
-	$returnUrl = $this->returnUrl;
536
+    $returnUrl = $this->returnUrl;
537 537
         # If we have an openid.delegate that is different from our claimed id,
538 538
         # we need to somehow preserve the claimed id between requests.
539 539
         # The simplest way is to just send it along with the return_to url.
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
             ) + $this->sregParams();
550 550
 
551 551
         return $this->build_url(parse_url($this->server)
552
-                               , array('query' => http_build_query($params, '', '&')));
552
+                                , array('query' => http_build_query($params, '', '&')));
553 553
     }
554 554
 
555 555
     protected function authUrl_v2($immediate)
@@ -574,14 +574,14 @@  discard block
 block discarded – undo
574 574
 
575 575
         if ($this->identifier_select) {
576 576
             $params['openid.identity'] = $params['openid.claimed_id']
577
-                 = 'http://specs.openid.net/auth/2.0/identifier_select';
577
+                    = 'http://specs.openid.net/auth/2.0/identifier_select';
578 578
         } else {
579 579
             $params['openid.identity'] = $this->identity;
580 580
             $params['openid.claimed_id'] = $this->claimed_id;
581 581
         }
582 582
 
583 583
         return $this->build_url(parse_url($this->server)
584
-                               , array('query' => http_build_query($params, '', '&')));
584
+                                , array('query' => http_build_query($params, '', '&')));
585 585
     }
586 586
 
587 587
     /**
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
             # If it's an OpenID 1 provider, and we've got claimed_id,
639 639
             # we have to append it to the returnUrl, like authUrl_v1 does.
640 640
             $this->returnUrl .= (strpos($this->returnUrl, '?') ? '&' : '?')
641
-                             .  'openid.claimed_id=' . $this->claimed_id;
641
+                                .  'openid.claimed_id=' . $this->claimed_id;
642 642
         }
643 643
 
644 644
         if ($this->data['openid_return_to'] != $this->returnUrl) {
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
                 continue;
708 708
             }
709 709
             $key = substr($this->data['openid_' . $alias . '_type_' . $key],
710
-                          strlen('http://axschema.org/'));
710
+                            strlen('http://axschema.org/'));
711 711
             $attributes[$key] = $value;
712 712
         }
713 713
         return $attributes;
Please login to merge, or discard this patch.
html/ops/db_action.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
         }
221 221
     }
222 222
     if ($detail == "low" || $table == "profile") {
223
-         end_table();
223
+            end_table();
224 224
     }
225 225
     _mysql_free_result($result);
226 226
 } else {
Please login to merge, or discard this patch.
html/ops/problem_host.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -116,14 +116,14 @@
 block discarded – undo
116 116
 } else {
117 117
     $host = BoincHost::lookup_id($hostid);
118 118
     if (!$host) {
119
-    	echo "<h2>No host with that ID</h2>
119
+        echo "<h2>No host with that ID</h2>
120 120
 	 	<center>Please <a href=\"problem_host.php\">try again</a></center>";
121 121
     } else {
122 122
         $user = BoincUser::lookup_id($host->userid);
123
-    	echo "<a href=\"problem_host.php\">Do another?</a><br><br>";
124
-    	send_problem_email($user, $host);
125
-    	echo "Email to ".$user->email_addr." has been sent.<br>";
126
-	}
123
+        echo "<a href=\"problem_host.php\">Do another?</a><br><br>";
124
+        send_problem_email($user, $host);
125
+        echo "Email to ".$user->email_addr." has been sent.<br>";
126
+    }
127 127
 }
128 128
 
129 129
 admin_page_tail();
Please login to merge, or discard this patch.
html/ops/clean_cache.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,17 +24,17 @@
 block discarded – undo
24 24
 set_time_limit(0);
25 25
 
26 26
 function cache_check_diskspace2(){
27
-   $too_old = 86400;
28
-   while (1) {
29
-       $f = disk_free_space("../cache");
30
-       $u = disk_usage("../cache");
31
-       echo "free: $f used: $u\n";
32
-       if ($f > MIN_FREE_SPACE && $u < MAX_CACHE_USAGE) {
33
-           break;
34
-       }
35
-       clean_cache($too_old, "../cache");
36
-       $too_old/=2;
37
-   }
27
+    $too_old = 86400;
28
+    while (1) {
29
+        $f = disk_free_space("../cache");
30
+        $u = disk_usage("../cache");
31
+        echo "free: $f used: $u\n";
32
+        if ($f > MIN_FREE_SPACE && $u < MAX_CACHE_USAGE) {
33
+            break;
34
+        }
35
+        clean_cache($too_old, "../cache");
36
+        $too_old/=2;
37
+    }
38 38
 }
39 39
 
40 40
 cache_check_diskspace2();
Please login to merge, or discard this patch.
html/ops/update_profile_pages.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
         for ($row = 0; $row < $height; $row++) {
201 201
             echo "<tr>";
202 202
             for ($col = 0; $col < $width; $col++) {
203
-	            if ($count < $numIds) {
203
+                if ($count < $numIds) {
204 204
                     echo "<td class=\"bordered\" align=\"center\">
205 205
                         <a href=\"".secure_url_base()."view_profile.php?userid=".$userIds[$count]."\"><img src=\"".secure_url_base().IMAGE_URL.$userIds[$count]."_sm.jpg\"></a>
206 206
                     </td>";
Please login to merge, or discard this patch.
html/ops/make_emails_lowercase.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 
38 38
 // activate/deactivate script
39 39
 if (1) {
40
-  echo "
40
+    echo "
41 41
 This script needs to be activated before it can be run.
42 42
 Once you understand what the script does you can change the
43 43
 if (1) to if (0) at the top of the file to activate it.
44 44
 Be sure to deactivate the script after using it to make sure
45 45
 it is not accidentally run.
46 46
 ";
47
-  exit;
47
+    exit;
48 48
 }
49 49
 
50 50
 db_init();
@@ -63,33 +63,33 @@  discard block
 block discarded – undo
63 63
 // loop over all users
64 64
 while ($user = _mysql_fetch_object($result)) {
65 65
 
66
-  $id=$user->id;
67
-  $email_addr=$user->email_addr;
68
-  $cpid=$user->cross_project_id;
66
+    $id=$user->id;
67
+    $email_addr=$user->email_addr;
68
+    $cpid=$user->cross_project_id;
69 69
 
70
-  $new_email=strtolower(trim($email_addr));
70
+    $new_email=strtolower(trim($email_addr));
71 71
   
72
-  if (strcmp($email_addr, $new_email))
72
+    if (strcmp($email_addr, $new_email))
73 73
     echo "Problematic email address [$id] $email_addr becomes $new_email<br/>";
74 74
   
75
-  if (!(strcmp($cpid,"0"))) {
75
+    if (!(strcmp($cpid,"0"))) {
76 76
     $newcpid=random_string();
77 77
     echo "Problematic CPID=0 for [$id] $email_addr gets CPID=$newcpid<br/>";
78
-  }
79
-  else
78
+    }
79
+    else
80 80
     $newcpid=$cpid;
81 81
   
82
-  if (strcmp($email_addr, $new_email) || strcmp($newcpid,$cpid)) {
82
+    if (strcmp($email_addr, $new_email) || strcmp($newcpid,$cpid)) {
83 83
     $update="update user set email_addr='$new_email', cross_project_id='$newcpid' where id='$id'";
84 84
     if ($confirm != "yes") {
85
-      echo "QUERY WOULD BE [$id] $query <br/>[click the link at the bottom to enable]<br/>";
86
-      $update_needed = TRUE;
85
+        echo "QUERY WOULD BE [$id] $query <br/>[click the link at the bottom to enable]<br/>";
86
+        $update_needed = TRUE;
87 87
     }
88 88
     else {
89
-      _mysql_query($update);
90
-      echo "Doing $update<br/>\n";
89
+        _mysql_query($update);
90
+        echo "Doing $update<br/>\n";
91
+    }
91 92
     }
92
-  }
93 93
 }
94 94
 if ($confirm != "yes" && $update_needed) {
95 95
     echo "You can enable the changes by <a href=\"make_emails_lowercase.php?confirm=yes\">click</a>";
Please login to merge, or discard this patch.
html/ops/dbinfo.php 1 patch
Indentation   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
     function __construct($n, $d, $i, $t, $r, $s) {
16 16
         $this->name = $n;
17 17
         $this->data_size = $d;
18
-		$this->index_size = $i;
19
-		$this->total_size = $t;
20
-		$this->rows = $r;
21
-		$this->size_per_row = $s;
18
+        $this->index_size = $i;
19
+        $this->total_size = $t;
20
+        $this->rows = $r;
21
+        $this->size_per_row = $s;
22 22
     }
23 23
     function __destruct() {
24 24
     }
@@ -42,40 +42,40 @@  discard block
 block discarded – undo
42 42
 
43 43
 // returns formatted data size
44 44
 function size_format($size){
45
-	$retval = 0;
45
+    $retval = 0;
46 46
 
47
-	$KB = 1024;
47
+    $KB = 1024;
48 48
     $MB = 1024*1024;
49 49
     $GB = 1024*1024*1024;
50
-	$TB = 1024*1024*1024*1024;
50
+    $TB = 1024*1024*1024*1024;
51 51
 	
52 52
     if ($size < $KB) {
53
-	    $retval = $size;
53
+        $retval = $size;
54 54
     } elseif (($size > $KB) && ($size < $MB)) {
55
-		$retval = sprintf("%.0fK", ($size / $KB));    
55
+        $retval = sprintf("%.0fK", ($size / $KB));    
56 56
     } elseif ( ($size >= $MB) && ($size < $GB)) {
57
-		$retval = sprintf("%.2fMB", ($size / $MB));
57
+        $retval = sprintf("%.2fMB", ($size / $MB));
58 58
     } elseif ( ($size >= $GB) && ($size < $TB)) {
59
-		$retval = sprintf("%.2fGB", ($size / $GB));
60
-	} elseif ( $size >= $TB ) {
61
-		$retval = sprintf("%.2fTB", ($size / $TB));
62
-	}
63
-	return $retval;
59
+        $retval = sprintf("%.2fGB", ($size / $GB));
60
+    } elseif ( $size >= $TB ) {
61
+        $retval = sprintf("%.2fTB", ($size / $TB));
62
+    }
63
+    return $retval;
64 64
 }
65 65
 
66 66
 
67 67
 // returns the DB data structure as DB_REC
68 68
 function get_db_info($db_name) 
69 69
 {
70
-	// Carl grabbed this from the mysql.com boards http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html  
70
+    // Carl grabbed this from the mysql.com boards http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html  
71 71
     $result = _mysql_query("SHOW TABLE STATUS FROM $db_name");
72 72
 
73 73
     // SQL output
74 74
     // mysql> show table status from [table_name];
75 75
     // | Name | Engine | Version | Row_format | Rows    
76
-	// | Avg_row_length | Data_length | Max_data_length  
77
-	// | Index_length | Data_free  | Auto_increment | Create_time         
78
-	// | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
76
+    // | Avg_row_length | Data_length | Max_data_length  
77
+    // | Index_length | Data_free  | Auto_increment | Create_time         
78
+    // | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
79 79
     //
80 80
 
81 81
     $gdata  = 0;
@@ -83,24 +83,24 @@  discard block
 block discarded – undo
83 83
     $gtotal = 0;
84 84
     $grows  = 0;
85 85
 
86
-	$i = 0;
87
-	$db_rec = array();
88
-	while($myarr = _mysql_fetch_assoc($result)) {
86
+    $i = 0;
87
+    $db_rec = array();
88
+    while($myarr = _mysql_fetch_assoc($result)) {
89 89
 
90
-		// sum grand totals
91
-		$total  =  $myarr["Data_length"] + $myarr["Index_length"];
92
-		$gindex += $myarr["Index_length"];
90
+        // sum grand totals
91
+        $total  =  $myarr["Data_length"] + $myarr["Index_length"];
92
+        $gindex += $myarr["Index_length"];
93 93
         $gdata  += $myarr["Data_length"];
94
-		$grows  += $myarr["Rows"]; 
95
-		$gtotal += $total;
94
+        $grows  += $myarr["Rows"]; 
95
+        $gtotal += $total;
96 96
  
97
-	    $db_rec[$i] = new DB_REC ($myarr["Name"], $myarr["Data_length"], $myarr["Index_length"], $total, $myarr["Rows"], $myarr["Avg_row_length"] );	
98
-		$i++;
99
-	}
97
+        $db_rec[$i] = new DB_REC ($myarr["Name"], $myarr["Data_length"], $myarr["Index_length"], $total, $myarr["Rows"], $myarr["Avg_row_length"] );	
98
+        $i++;
99
+    }
100 100
 
101 101
     $db_rec[$i] = new DB_REC ("Total", $gdata, $gindex, $gtotal, $grows, "" );	
102 102
 
103
-	return $db_rec;
103
+    return $db_rec;
104 104
 }
105 105
 
106 106
 
@@ -108,41 +108,41 @@  discard block
 block discarded – undo
108 108
 function show_db_info($db_name, $db_rec) 
109 109
 { 
110 110
 
111
-	echo "<table cols=6>";
112
-	echo "<tr>";
113
-	echo "<th colspan=6> Database $db_name </th>";
114
-	echo "</tr>";
115
-
116
-	echo "<tr>";
117
-	echo "<th>Table</th>";
118
-	echo "<th>Data Size</th>";
119
-	echo "<th>Index Size</th>";
120
-	echo "<th>Total Size</th>";
121
-	echo "<th>Total Rows</th>";
122
-	echo "<th>Avg. Size per Row</th>";
123
-	echo "</tr>";
124
-
125
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){ 
126
-		echo "<tr>";
127
-		echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
128
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
129
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->index_size) . "</td>";
130
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->total_size) . "</td>";
111
+    echo "<table cols=6>";
112
+    echo "<tr>";
113
+    echo "<th colspan=6> Database $db_name </th>";
114
+    echo "</tr>";
115
+
116
+    echo "<tr>";
117
+    echo "<th>Table</th>";
118
+    echo "<th>Data Size</th>";
119
+    echo "<th>Index Size</th>";
120
+    echo "<th>Total Size</th>";
121
+    echo "<th>Total Rows</th>";
122
+    echo "<th>Avg. Size per Row</th>";
123
+    echo "</tr>";
124
+
125
+    for ($i = 0; $i < sizeof($db_rec)-1; $i++){ 
126
+        echo "<tr>";
127
+        echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
128
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
129
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->index_size) . "</td>";
130
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->total_size) . "</td>";
131 131
         echo "<td align=left valign=top class=fieldname>" . number_format($db_rec[$i]->rows)     . "</td>";
132 132
         echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->size_per_row) . "</td>";
133
-		echo "</tr>";
134
-	}
133
+        echo "</tr>";
134
+    }
135 135
 
136
-	// Last record is just a summary
137
-	$i = sizeof($db_rec)-1;
138
-	echo "<tr>";
136
+    // Last record is just a summary
137
+    $i = sizeof($db_rec)-1;
138
+    echo "<tr>";
139 139
     echo "<th align=left>" . $db_rec[$i]->name . "</th>";
140 140
     echo "<th align=left>" . size_format($db_rec[$i]->data_size)  . "</th>";
141 141
     echo "<th align=left>" . size_format($db_rec[$i]->index_size) . "</th>";
142 142
     echo "<th align=left>" . size_format($db_rec[$i]->total_size) . "</th>";
143 143
     echo "<th align=left>" . number_format($db_rec[$i]->rows)     . "</th>";
144 144
     echo "<th align=left></th>";
145
-	echo "</tr>";
145
+    echo "</tr>";
146 146
 
147 147
     echo "</table>";
148 148
 }
@@ -152,80 +152,80 @@  discard block
 block discarded – undo
152 152
 // NB: same as show_db_info but with sortable cloumns
153 153
 function sort_db_info($db_name, $db_rec) 
154 154
 { 
155
-	// sort 
156
-	$file_list = array();
155
+    // sort 
156
+    $file_list = array();
157 157
     $file_sort = array();
158 158
 
159
-	$sort =  get_str("sort", true);
160
-	$r = get_str("r", true);
161
-
162
-	// check if its empty
163
-	if(empty($sort)) $sort = "name";
164
-	// check for allowed keys 
165
-	if ((strcmp($sort, "name")!=0) && 
166
-		(strcmp($sort, "data_size")!=0) && 
167
-		(strcmp($sort, "index_size")!=0) && 
168
-		(strcmp($sort, "total_size")!=0)  && 
169
-		(strcmp($sort, "rows")!=0) && 
170
-		(strcmp($sort, "size_per_row")!=0)) 
171
-		$sort = "name";
172
-	if(empty($r)) $r=0;
173
-
174
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){
175
-		$file_details["name"]         = $db_rec[$i]->name;
176
-		$file_details["data_size"]    = $db_rec[$i]->data_size;
177
-		$file_details["index_size"]   = $db_rec[$i]->index_size;
178
-		$file_details["total_size"]   = $db_rec[$i]->total_size;
179
-	    $file_details["rows"]         = $db_rec[$i]->rows;
180
-		$file_details["size_per_row"] = $db_rec[$i]->size_per_row;
181
-
182
-		$file_list[$i] = $file_details;
183
-		$key = strtolower($file_details[$sort]);
184
-		$file_sort[$i] = $key;
185
-	}
159
+    $sort =  get_str("sort", true);
160
+    $r = get_str("r", true);
161
+
162
+    // check if its empty
163
+    if(empty($sort)) $sort = "name";
164
+    // check for allowed keys 
165
+    if ((strcmp($sort, "name")!=0) && 
166
+        (strcmp($sort, "data_size")!=0) && 
167
+        (strcmp($sort, "index_size")!=0) && 
168
+        (strcmp($sort, "total_size")!=0)  && 
169
+        (strcmp($sort, "rows")!=0) && 
170
+        (strcmp($sort, "size_per_row")!=0)) 
171
+        $sort = "name";
172
+    if(empty($r)) $r=0;
173
+
174
+    for ($i = 0; $i < sizeof($db_rec)-1; $i++){
175
+        $file_details["name"]         = $db_rec[$i]->name;
176
+        $file_details["data_size"]    = $db_rec[$i]->data_size;
177
+        $file_details["index_size"]   = $db_rec[$i]->index_size;
178
+        $file_details["total_size"]   = $db_rec[$i]->total_size;
179
+        $file_details["rows"]         = $db_rec[$i]->rows;
180
+        $file_details["size_per_row"] = $db_rec[$i]->size_per_row;
181
+
182
+        $file_list[$i] = $file_details;
183
+        $key = strtolower($file_details[$sort]);
184
+        $file_sort[$i] = $key;
185
+    }
186 186
 	
187
-	if($r)arsort($file_sort);
187
+    if($r)arsort($file_sort);
188 188
     else  asort($file_sort);
189
-	// -- end sort 
190
-
191
-	echo "<table cols=6>";
192
-	echo "<tr>";
193
-	echo "<th colspan=6> Database $db_name </th>";
194
-	echo "</tr>";
195
-
196
-	echo "<tr>";
197
-	echo "<th><a href='dbinfo.php?sort=name&r=" . (!$r) . "'>Table </a></th>";
198
-	echo "<th><a href='dbinfo.php?sort=data_size&r=" . (!$r) . "'>Data Size</a></th>";
199
-	echo "<th><a href='dbinfo.php?sort=index_size&r=" . (!$r) . "'>Index Size</a></th>";
200
-	echo "<th><a href='dbinfo.php?sort=total_size&r=" . (!$r) . "'>Total Size</a></th>";
201
-	echo "<th><a href='dbinfo.php?sort=rows&r=" . (!$r) . "'>Total Rows</a></th>";
202
-	echo "<th><a href='dbinfo.php?sort=size_per_row&r=" . (!$r) . "'>Avg. Size per Row</a></th>";
203
-	echo "</tr>";
204
-
205
-	$i = 0;
206
-	while ( list($key, $value) = each($file_sort) ) {
207
-		$value = $file_list[$key];
208
-		echo "<tr>"; 
209
-		echo "<td align=left valign=top class=fieldname>" . $value["name"] . "</td>";
210
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["data_size"])  . "</td>";
211
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["index_size"]) . "</td>";
212
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["total_size"]) . "</td>";
189
+    // -- end sort 
190
+
191
+    echo "<table cols=6>";
192
+    echo "<tr>";
193
+    echo "<th colspan=6> Database $db_name </th>";
194
+    echo "</tr>";
195
+
196
+    echo "<tr>";
197
+    echo "<th><a href='dbinfo.php?sort=name&r=" . (!$r) . "'>Table </a></th>";
198
+    echo "<th><a href='dbinfo.php?sort=data_size&r=" . (!$r) . "'>Data Size</a></th>";
199
+    echo "<th><a href='dbinfo.php?sort=index_size&r=" . (!$r) . "'>Index Size</a></th>";
200
+    echo "<th><a href='dbinfo.php?sort=total_size&r=" . (!$r) . "'>Total Size</a></th>";
201
+    echo "<th><a href='dbinfo.php?sort=rows&r=" . (!$r) . "'>Total Rows</a></th>";
202
+    echo "<th><a href='dbinfo.php?sort=size_per_row&r=" . (!$r) . "'>Avg. Size per Row</a></th>";
203
+    echo "</tr>";
204
+
205
+    $i = 0;
206
+    while ( list($key, $value) = each($file_sort) ) {
207
+        $value = $file_list[$key];
208
+        echo "<tr>"; 
209
+        echo "<td align=left valign=top class=fieldname>" . $value["name"] . "</td>";
210
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["data_size"])  . "</td>";
211
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["index_size"]) . "</td>";
212
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["total_size"]) . "</td>";
213 213
         echo "<td align=left valign=top class=fieldname>" . number_format($value["rows"])     . "</td>";
214 214
         echo "<td align=left valign=top class=fieldname>" . size_format($value["size_per_row"]) . "</td>";
215
-		echo "</tr>";
216
-		$i++;
217
-	}
215
+        echo "</tr>";
216
+        $i++;
217
+    }
218 218
 
219
-	// Last record is just a summary
220
-	$i = sizeof($db_rec)-1;
221
-	echo "<tr>";
219
+    // Last record is just a summary
220
+    $i = sizeof($db_rec)-1;
221
+    echo "<tr>";
222 222
     echo "<th align=left>" . $db_rec[$i]->name . "</th>";
223 223
     echo "<th align=left>" . size_format($db_rec[$i]->data_size)  . "</th>";
224 224
     echo "<th align=left>" . size_format($db_rec[$i]->index_size) . "</th>";
225 225
     echo "<th align=left>" . size_format($db_rec[$i]->total_size) . "</th>";
226 226
     echo "<th align=left>" . number_format($db_rec[$i]->rows)     . "</th>";
227 227
     echo "<th align=left></th>";
228
-	echo "</tr>";
228
+    echo "</tr>";
229 229
 
230 230
     echo "</table>";
231 231
 }
Please login to merge, or discard this patch.
html/ops/db_schemaversion.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 $updates = array();
29 29
 foreach ($db_updates as $db_update) {
30 30
     if ($db_update[0] > $db_revision) {
31
-		$db_revision = $db_update[0];
31
+        $db_revision = $db_update[0];
32 32
     }
33 33
 }
34 34
 
Please login to merge, or discard this patch.