Completed
Push — master ( 6e38a6...4ed690 )
by Christian
10:37
created
html/ops/db_update.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     do_query("alter table host add max_results_day integer not null");
275 275
 }
276 276
 
277
-function update_4_20_2005(){
277
+function update_4_20_2005() {
278 278
     do_query("ALTER TABLE `thread` ADD `sticky` TINYINT UNSIGNED DEFAULT '0' NOT NULL");
279 279
     do_query("ALTER TABLE `forum` ADD `post_min_total_credit` INT NOT NULL AFTER `posts`");
280 280
     do_query("ALTER TABLE `forum` ADD `post_min_expavg_credit` INT NOT NULL AFTER `posts`");
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     do_query("ALTER TABLE `forum_preferences` ADD `last_post` INT( 14 ) UNSIGNED NOT NULL AFTER `posts`");
285 285
 }
286 286
 
287
-function update_4_30_2005(){
287
+function update_4_30_2005() {
288 288
     do_query("ALTER TABLE `forum_preferences` ADD `ignore_sticky_posts` TINYINT( 1 ) UNSIGNED NOT NULL");
289 289
 }    
290 290
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     do_query("update user set country='Macedonia' where country='Macedonia, The Former Yugoslav Republic of'");
312 312
 }
313 313
 
314
-function update_11_24_2005(){
314
+function update_11_24_2005() {
315 315
     do_query("ALTER TABLE `forum_preferences` ADD `minimum_wrap_postcount` INT DEFAULT '100' NOT NULL AFTER `high_rating_threshold` ,
316 316
 ADD `display_wrap_postcount` INT DEFAULT '75' NOT NULL AFTER `minimum_wrap_postcount`");
317 317
 }
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
     ");
617 617
 }
618 618
 
619
-function update_10_05_2008(){
619
+function update_10_05_2008() {
620 620
     do_query("alter table forum_preferences add highlight_special tinyint default '1' not null");
621 621
 }
622 622
 
Please login to merge, or discard this patch.
html/ops/team_import.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
             $t->user_postal_code = decode($t->user_postal_code);
64 64
             $t->user_url = decode($t->user_url);
65 65
             return $t;
66
-        }
67
-        else if (strstr($s, '<name>')) $t->name = parse_element($s, '<name>');
66
+        } else if (strstr($s, '<name>')) $t->name = parse_element($s, '<name>');
68 67
         else if (strstr($s, '<url>')) $t->url = parse_element($s, '<url>');
69 68
         else if (strstr($s, '<type>')) $t->type = parse_element($s, '<type>');
70 69
         else if (strstr($s, '<name_html>')) $t->name_html = parse_element($s, '<name_html>');
@@ -73,14 +72,12 @@  discard block
 block discarded – undo
73 72
                 if (strstr($s, '</description>')) break;
74 73
                 $t->description .= $s;
75 74
             }
76
-        }
77
-        else if (strstr($s, '<country>')) $t->country = parse_element($s, '<country>');
75
+        } else if (strstr($s, '<country>')) $t->country = parse_element($s, '<country>');
78 76
         else if (strstr($s, '<id>')) $t->id = parse_element($s, '<id>');
79 77
         else if (strstr($s, '<user_email_munged>')) {
80 78
             $user_email_munged = parse_element($s, '<user_email_munged>');
81 79
             $t->user_email = str_rot13($user_email_munged);
82
-        }
83
-        else if (strstr($s, '<user_name>')) $t->user_name = parse_element($s, '<user_name>');
80
+        } else if (strstr($s, '<user_name>')) $t->user_name = parse_element($s, '<user_name>');
84 81
         else if (strstr($s, '<user_country>')) $t->user_country = parse_element($s, '<user_country>');
85 82
         else if (strstr($s, '<user_postal_code>')) $t->user_postal_code = parse_element($s, '<user_postal_code>');
86 83
         else if (strstr($s, '<user_url>')) $t->user_url = parse_element($s, '<user_url>');
Please login to merge, or discard this patch.
html/ops/remind.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
         _mysql_query($query);
230 230
     }
231 231
     $globals->count--;
232
-    if ($globals->count == 0) { 
232
+    if ($globals->count == 0) {
233 233
         echo "reached limit set by --count - exiting...\n";
234 234
         exit();
235 235
     }
Please login to merge, or discard this patch.
html/ops/dbinfo.php 1 patch
Braces   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 
43 43
 // returns formatted data size
44
-function size_format($size){
44
+function size_format($size) {
45 45
 	$retval = 0;
46 46
 
47 47
 	$KB = 1024;
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 
67 67
 // returns the DB data structure as DB_REC
68
-function get_db_info($db_name) 
69
-{
68
+function get_db_info($db_name) {
70 69
 	// Carl grabbed this from the mysql.com boards http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html  
71 70
     $result = _mysql_query("SHOW TABLE STATUS FROM $db_name");
72 71
 
@@ -105,8 +104,7 @@  discard block
 block discarded – undo
105 104
 
106 105
 
107 106
 // shows the plain db structure
108
-function show_db_info($db_name, $db_rec) 
109
-{ 
107
+function show_db_info($db_name, $db_rec) {
110 108
 
111 109
 	echo "<table cols=6>";
112 110
 	echo "<tr>";
@@ -122,7 +120,7 @@  discard block
 block discarded – undo
122 120
 	echo "<th>Avg. Size per Row</th>";
123 121
 	echo "</tr>";
124 122
 
125
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){ 
123
+	for ($i = 0; $i < sizeof($db_rec)-1; $i++) {
126 124
 		echo "<tr>";
127 125
 		echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
128 126
 		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
@@ -150,8 +148,7 @@  discard block
 block discarded – undo
150 148
 
151 149
 
152 150
 // NB: same as show_db_info but with sortable cloumns
153
-function sort_db_info($db_name, $db_rec) 
154
-{ 
151
+function sort_db_info($db_name, $db_rec) {
155 152
 	// sort 
156 153
 	$file_list = array();
157 154
     $file_sort = array();
@@ -171,7 +168,7 @@  discard block
 block discarded – undo
171 168
 		$sort = "name";
172 169
 	if(empty($r)) $r=0;
173 170
 
174
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){
171
+	for ($i = 0; $i < sizeof($db_rec)-1; $i++) {
175 172
 		$file_details["name"]         = $db_rec[$i]->name;
176 173
 		$file_details["data_size"]    = $db_rec[$i]->data_size;
177 174
 		$file_details["index_size"]   = $db_rec[$i]->index_size;
Please login to merge, or discard this patch.
html/ops/bbcode_convert_signature.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,14 +43,15 @@
 block discarded – undo
43 43
     $forum_preferencess = _mysql_query("select * from forum_preferences where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45 45
     $i=0;
46
-    while ($forum_preferences = _mysql_fetch_object($forum_preferencess)){
46
+    while ($forum_preferences = _mysql_fetch_object($forum_preferencess)) {
47 47
         $i++; 
48
-        if ($i%100 == 0) {                      //For every 100 forum_preferencess
48
+        if ($i%100 == 0) {
49
+//For every 100 forum_preferencess
49 50
             echo $forum_preferences->userid.". "; flush();   // print out where we are
50 51
             //usleep(200000);
51 52
         }
52 53
         
53
-        if ($forum_preferences->userid > $start_id){
54
+        if ($forum_preferences->userid > $start_id) {
54 55
             fix_forum_preferences($forum_preferences);
55 56
         }
56 57
     }
Please login to merge, or discard this patch.
html/ops/db_form.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
 start_table();
36 36
 
37
-switch($table){
37
+switch($table) {
38 38
 	case "platform": 
39 39
 		break;
40 40
 	case "app": 
Please login to merge, or discard this patch.
html/ops/cancel_workunits.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,8 @@
 block discarded – undo
100 100
     echo "</p>\n";
101 101
     echo "</form>\n";
102 102
 
103
-} else { // if ($qclause)
103
+} else {
104
+// if ($qclause)
104 105
 
105 106
     $query = "SELECT id, name FROM workunit WHERE canonical_resultid = 0 AND error_mask = 0 AND $qclause;";
106 107
     $db = BoincDb::get(true);
Please login to merge, or discard this patch.
html/ops/bbcode_convert.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,14 +45,15 @@
 block discarded – undo
45 45
     $posts = _mysql_query("select * from post where id>$start_id order by id");
46 46
     echo _mysql_error();
47 47
     $i=0;
48
-    while ($post = _mysql_fetch_object($posts)){
48
+    while ($post = _mysql_fetch_object($posts)) {
49 49
         $i++; 
50
-        if ($i%100 == 0) {                      //For every 100 posts
50
+        if ($i%100 == 0) {
51
+//For every 100 posts
51 52
             echo $post->id.". "; flush();   // print out where we are
52 53
             //usleep(200000);
53 54
         }
54 55
         
55
-        if ($post->id > $start_id){
56
+        if ($post->id > $start_id) {
56 57
             fix_post($post);
57 58
         }
58 59
     }
Please login to merge, or discard this patch.
html/ops/grant_credit.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 function testquery($argstring) {
42 42
     if (0) {
43 43
         echo "WOULD DO: $argstring\n";
44
-    }
45
-    else {
44
+    } else {
46 45
         _mysql_query($argstring);
47 46
     }
48 47
     return;
Please login to merge, or discard this patch.