Passed
Pull Request — master (#6441)
by
unknown
09:23
created
html/ops/bbcode_convert.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@
 block discarded – undo
44 44
     $start_id = 0; //Set this to something else if you like
45 45
     $posts = _mysql_query("select * from post where id>$start_id order by id");
46 46
     echo _mysql_error();
47
-    $i=0;
48
-    while ($post = _mysql_fetch_object($posts)){
47
+    $i = 0;
48
+    while ($post = _mysql_fetch_object($posts)) {
49 49
         $i++;
50 50
         if ($i%100 == 0) {                      //For every 100 posts
51
-            echo $post->id.". "; flush();   // print out where we are
51
+            echo $post->id.". "; flush(); // print out where we are
52 52
             //usleep(200000);
53 53
         }
54 54
 
55
-        if ($post->id > $start_id){
55
+        if ($post->id > $start_id) {
56 56
             fix_post($post);
57 57
         }
58 58
     }
Please login to merge, or discard this patch.
html/ops/manage_app_versions.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
       "deprecated?",
73 73
       ""
74 74
     );
75
-    $clause = $all?"true":"deprecated = 0";
75
+    $clause = $all ? "true" : "deprecated = 0";
76 76
     $avs = BoincAppVersion::enum(
77 77
         "$clause order by appid, platformid, plan_class, version_num"
78 78
     );
@@ -80,20 +80,20 @@  discard block
 block discarded – undo
80 80
     foreach ($avs as $av) {
81 81
         // grey out deprecated versions
82 82
         //
83
-        $f1=$f2='';
83
+        $f1 = $f2 = '';
84 84
         if ($av->deprecated == 1) {
85
-            $f1="<font color='GREY'>";
86
-            $f2="</font>";
85
+            $f1 = "<font color='GREY'>";
86
+            $f2 = "</font>";
87 87
         }
88 88
 
89
-        $all_value = $all?1:0;
89
+        $all_value = $all ? 1 : 0;
90 90
         $app = $apps[$av->appid];
91 91
         // ignore app versions of deprecated apps by default
92 92
         if ($all_value == 0 && $app->deprecated == 1) {
93 93
             continue;
94 94
         }
95 95
         echo "<tr class=row$i><form action=manage_app_versions.php?all=$all_value#av_$av->id method=POST>\n";
96
-        $i = 1-$i;
96
+        $i = 1 - $i;
97 97
         echo "<input type=hidden name=id value=$av->id>";
98 98
         echo "  <TD>$f1 <a id='av_$av->id' href=db_action.php?table=app_version&id=$av->id>$av->id</a> $f2</TD>\n";
99 99
 
@@ -110,15 +110,15 @@  discard block
 block discarded – undo
110 110
         $v = $av->min_core_version;
111 111
         echo "  <TD><input type='text' size='4' name=min_core_version value='$v'></TD>\n";
112 112
 
113
-        $v=$av->max_core_version;
113
+        $v = $av->max_core_version;
114 114
         echo "  <TD><input type='text' size='4' name=max_core_version value='$v'></TD>\n";
115 115
 
116
-        $v='';
117
-        if ($av->beta) $v=' CHECKED ';
116
+        $v = '';
117
+        if ($av->beta) $v = ' CHECKED ';
118 118
         echo "  <TD> <input name=beta type='checkbox' $v></TD>\n";
119 119
 
120
-        $v='';
121
-        if ($av->deprecated) $v=' CHECKED ';
120
+        $v = '';
121
+        if ($av->deprecated) $v = ' CHECKED ';
122 122
         echo "  <TD> <input name=deprecated type='checkbox' $v></TD>\n";
123 123
 
124 124
         if (!in_rops()) {
Please login to merge, or discard this patch.
html/ops/eah_server_status.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 }
42 42
 
43 43
 function find_oldest() {
44
-   $result=_mysql_query("select name,create_time from result where server_state=2 order by create_time limit 1");
44
+   $result = _mysql_query("select name,create_time from result where server_state=2 order by create_time limit 1");
45 45
    $x = _mysql_fetch_object($result);
46 46
    return $x->create_time;
47 47
 }
@@ -88,25 +88,25 @@  discard block
 block discarded – undo
88 88
 
89 89
 
90 90
 
91
-$dbrc = db_init(1);    // 1=soft, remember that DB might be down
91
+$dbrc = db_init(1); // 1=soft, remember that DB might be down
92 92
 
93
-page_head(PROJECT . " - Server Status");
93
+page_head(PROJECT." - Server Status");
94 94
 
95 95
 
96 96
 // Date stamp
97 97
 
98 98
 
99
-echo "<br ALIGN=RIGHT> ".PROJECT. " server status as of ".
100
-    date("g:i A T"). " on ". date("l, j F Y ") .
99
+echo "<br ALIGN=RIGHT> ".PROJECT." server status as of ".
100
+    date("g:i A T")." on ".date("l, j F Y ").
101 101
     " (updated every $Nmin minutes).\n";
102 102
 
103
-$proc_uptime=exec("cat /proc/uptime | cut -d\" \" -f-1");
103
+$proc_uptime = exec("cat /proc/uptime | cut -d\" \" -f-1");
104 104
 $days = (int)($proc_uptime/86400);
105
-$hours=(int)($proc_uptime/3600);
106
-$hours=$hours % 24;
107
-$minutes=(int)($proc_uptime/60);
108
-$minutes=$minutes % 60;
109
-echo "<br ALIGN=RIGHT>The ".PROJECT. " main server has been continuously up for ". "$days"." days "."$hours"." hours "."$minutes"." minutes.\n<P>";
105
+$hours = (int)($proc_uptime/3600);
106
+$hours = $hours%24;
107
+$minutes = (int)($proc_uptime/60);
108
+$minutes = $minutes%60;
109
+echo "<br ALIGN=RIGHT>The ".PROJECT." main server has been continuously up for "."$days"." days "."$hours"." hours "."$minutes"." minutes.\n<P>";
110 110
 
111 111
 // tables side by side
112 112
 echo "<TABLE><TR><TD align=center> \n";
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
 if ($dbrc) {
153 153
     echo "The database server is not accessable";
154 154
 } else {
155
-    $now=time(0);
156
-    $s_day=24*3600;
157
-    $d_ago=$now-$s_day;
158
-    $s_week=7*$s_day;
159
-    $w_ago=$now-$s_week;
155
+    $now = time(0);
156
+    $s_day = 24*3600;
157
+    $d_ago = $now - $s_day;
158
+    $s_week = 7*$s_day;
159
+    $w_ago = $now - $s_week;
160 160
 
161 161
     echo "
162 162
         <table border=2 cellpadding=6>
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
         <tr><td>invalid</td><td>".number_format($n)."</td></tr>
277 277
     ";
278 278
 
279
-    $n = time(0)-find_oldest();
279
+    $n = time(0) - find_oldest();
280 280
     $days = (int)($n/86400);
281
-    $hours=(int)($n/3600);
282
-    $hours=$hours % 24;
283
-    $minutes=(int)($n/60);
284
-    $minutes=$minutes % 60;
281
+    $hours = (int)($n/3600);
282
+    $hours = $hours%24;
283
+    $minutes = (int)($n/60);
284
+    $minutes = $minutes%60;
285 285
     echo "
286 286
         <tr><td>Oldest Unsent Result</td><td>".$days." d ".$hours." h ".$minutes." m</td></tr>
287 287
     ";
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
 // Display cgi-bin restriction status
299 299
 
300
-if (  file_exists("../../cgi-bin/.htaccess") ) {
300
+if (file_exists("../../cgi-bin/.htaccess")) {
301 301
     echo "<P><font color=RED>
302 302
         <b>The ".PROJECT." scheduler is currently restricted
303 303
 	  to uwm.edu and a few other domains.
Please login to merge, or discard this patch.
html/ops/db_update.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     do_query("alter table host add max_results_day integer not null");
277 277
 }
278 278
 
279
-function update_4_20_2005(){
279
+function update_4_20_2005() {
280 280
     do_query("ALTER TABLE `thread` ADD `sticky` TINYINT UNSIGNED DEFAULT '0' NOT NULL");
281 281
     do_query("ALTER TABLE `forum` ADD `post_min_total_credit` INT NOT NULL AFTER `posts`");
282 282
     do_query("ALTER TABLE `forum` ADD `post_min_expavg_credit` INT NOT NULL AFTER `posts`");
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     do_query("ALTER TABLE `forum_preferences` ADD `last_post` INT( 14 ) UNSIGNED NOT NULL AFTER `posts`");
287 287
 }
288 288
 
289
-function update_4_30_2005(){
289
+function update_4_30_2005() {
290 290
     do_query("ALTER TABLE `forum_preferences` ADD `ignore_sticky_posts` TINYINT( 1 ) UNSIGNED NOT NULL");
291 291
 }
292 292
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     do_query("update user set country='Macedonia' where country='Macedonia, The Former Yugoslav Republic of'");
314 314
 }
315 315
 
316
-function update_11_24_2005(){
316
+function update_11_24_2005() {
317 317
     do_query("ALTER TABLE `forum_preferences` ADD `minimum_wrap_postcount` INT DEFAULT '100' NOT NULL AFTER `high_rating_threshold` ,
318 318
 ADD `display_wrap_postcount` INT DEFAULT '75' NOT NULL AFTER `minimum_wrap_postcount`");
319 319
 }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
     ");
619 619
 }
620 620
 
621
-function update_10_05_2008(){
621
+function update_10_05_2008() {
622 622
     do_query("alter table forum_preferences add highlight_special tinyint default '1' not null");
623 623
 }
624 624
 
@@ -1244,7 +1244,7 @@  discard block
 block discarded – undo
1244 1244
 // This used to be the Subversion version#,
1245 1245
 // but with Git we just use sequential integers
1246 1246
 //
1247
-$db_updates = array (
1247
+$db_updates = array(
1248 1248
     array(18490, "update_6_16_2009"),
1249 1249
     array(19001, "update_9_3_2009"),
1250 1250
     array(20807, "update_3_5_2010"),
Please login to merge, or discard this patch.
html/ops/bbcode_convert_response2.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
     $start_id = 0; //Set this to something else if you like
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45
-    $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
45
+    $i = 0;
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++;
48 48
         if ($i%100 == 0) {                      //For every 100 profiles
49
-            echo $profile->userid.". "; flush();   // print out where we are
49
+            echo $profile->userid.". "; flush(); // print out where we are
50 50
             //usleep(200000);
51 51
         }
52 52
 
53
-        if ($profile->userid > $start_id){
53
+        if ($profile->userid > $start_id) {
54 54
             fix_profile($profile);
55 55
         }
56 56
     }
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
   foreach ($documents as $document) {
79 79
     //dd($document, "index documents alter - document");
80 80
 
81
-    $to_process = ( array_key_exists($document->bundle, $node_types) AND $node_types[$document->bundle] );
82
-    if ( $document->entity_type=='node' AND $to_process) {
81
+    $to_process = (array_key_exists($document->bundle, $node_types) AND $node_types[$document->bundle]);
82
+    if ($document->entity_type == 'node' AND $to_process) {
83 83
 
84 84
       // Remove ts_comments if present.
85 85
       if (isset($document->ts_comments)) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $comment_document->bundle = 'Comment';
111 111
         $comment_document->bundle_name = 'Comment';
112 112
 
113
-        $comment_document->path = 'goto/comment/' . $comment->cid;
113
+        $comment_document->path = 'goto/comment/'.$comment->cid;
114 114
         $comment_document->url = url($comment_document->path, $url_options);
115 115
 
116 116
         // Comment object has no language
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         // Index formatted username so it can be searched and sorted
142 142
         // on.
143
-        $account = (object) array('uid' => $comment->uid, 'name' => $comment->name);
143
+        $account = (object)array('uid' => $comment->uid, 'name' => $comment->name);
144 144
         $username = check_plain($account->name);
145 145
         $comment_document->ss_name_formatted = $username;
146 146
         $comment_document->tos_name_formatted = $username;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
           // Copy over fields [im_taxonomy_vid_1], [tid], [im_vid_1],
186 186
           // [im_vid_Forums], [tm_vid_1_names]
187
-          if ( ( preg_match('/tid/', $fieldName) OR preg_match('/vid/', $fieldName) ) AND is_array($fieldValue) ) {
187
+          if ((preg_match('/tid/', $fieldName) OR preg_match('/vid/', $fieldName)) AND is_array($fieldValue)) {
188 188
             foreach ($fieldValue as $subkey => $subvalue) {
189 189
               $comment_document->addField($fieldName, $subvalue);
190 190
             }
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
  */
227 227
 function boinc_solr_comments_apachesolr_process_results(&$results, DrupalSolrQueryInterface $query) {
228 228
   //dpm($query->getSolrParams(), "process_results query getSolrParams");
229
-  foreach($results as $id => $result) {
230
-    if ($result['entity_type']=='comment') {
229
+  foreach ($results as $id => $result) {
230
+    if ($result['entity_type'] == 'comment') {
231 231
         $results[$id]['type'] = 'Comment';
232 232
         $results[$id]['date'] = $result['fields']['changed'];
233 233
         if (isset($result['fields']['is_uid'])) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
  */
253 253
 function boinc_solr_comments_apachesolr_query_alter($query) {
254 254
   // Add custom field to query results
255
-  $query->addParam('fl','tos_content_extra');
255
+  $query->addParam('fl', 'tos_content_extra');
256 256
 }
257 257
 
258 258
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
   switch ($op) {
283 283
     case 'delete':
284 284
       // Only call delete function on certain node types
285
-      if (in_array( $node->type, $node_types)) {
285
+      if (in_array($node->type, $node_types)) {
286 286
         boinc_solr_comments_delete($node);
287 287
       }
288 288
       break;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
   try {
315 315
     $solr = apachesolr_get_solr($env_id);
316 316
     // Custom query to find all comments with parent nid of the node bing deleted.
317
-    $query = "entity_type:comment AND tos_content_extra:" . $node->nid;
317
+    $query = "entity_type:comment AND tos_content_extra:".$node->nid;
318 318
     $solr->deleteByQuery($query);
319 319
     // Log the query used for deletion.
320 320
     watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
  */
400 400
 
401 401
 function boinc_solr_comments_enable() {
402
-  drupal_set_message( bts('Warning: Your content <a href="@url">must be re-indexed</a> before Apache Solr will search comments.', array('@url' => url('admin/settings/apachesolr/index')), NULL, 'boinc:admin-solr-index-comments-message'), 'warning');
402
+  drupal_set_message(bts('Warning: Your content <a href="@url">must be re-indexed</a> before Apache Solr will search comments.', array('@url' => url('admin/settings/apachesolr/index')), NULL, 'boinc:admin-solr-index-comments-message'), 'warning');
403 403
 }
404 404
 
405 405
 /**
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
  *   The comment to be published (unhidden).
411 411
  */
412 412
 function boinc_solr_comments_publish($comment) {
413
-  if ( ($comment->cid) AND ($comment->nid) ) {
413
+  if (($comment->cid) AND ($comment->nid)) {
414 414
     $node = node_load($comment->nid);
415 415
     // Tell Solr that the node has been updated, so the comment can be
416 416
     // indexed.
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
  *   The comment to be unpublished (hidden).
427 427
  */
428 428
 function boinc_solr_comments_unpublish($comment) {
429
-  if ( ($comment->cid) ) {
429
+  if (($comment->cid)) {
430 430
     // Call the deletecomment function for hook comment.
431 431
     boinc_solr_comments_deletecomment($comment);
432 432
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.helpers.inc 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
       WHERE n.type = 'profile'
166 166
       AND n.status = 1
167 167
       AND n.moderate = 0
168
-      " . ($never_been_picked ? " AND bu.uotd_time = 0 " : '') . "
169
-      " . ($active_users ? " AND bu.boinc_id IN ({$active_users}) " : '') . "
168
+      " . ($never_been_picked ? " AND bu.uotd_time = 0 " : '')."
169
+      " . ($active_users ? " AND bu.boinc_id IN ({$active_users}) " : '')."
170 170
       ORDER BY RAND()
171 171
       LIMIT 1"
172 172
     ));
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
  * this function is called, it may be called with optional parameters
213 213
  * new and prev email.
214 214
  */
215
-function _boincuser_send_emailchange($account, $new_email=NULL, $prev_email=NULL, $adminuser=FALSE) {
215
+function _boincuser_send_emailchange($account, $new_email = NULL, $prev_email = NULL, $adminuser = FALSE) {
216 216
   require_boinc('token');
217 217
   module_load_include('inc', 'rules', 'modules/system.rules');
218 218
 
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     // Name is limited to 60 characters, but we want to leave space to add a
304 304
     // tally if needed (for users with duplicate names); Limit to 56 chars and
305 305
     // replace the middle of the string with "..." if too long
306
-    $cleaned_name = substr_replace($cleaned_name, '...', 28, ($name_length-56)+3);
306
+    $cleaned_name = substr_replace($cleaned_name, '...', 28, ($name_length - 56) + 3);
307 307
   }
308 308
 
309 309
   // Determine if there are duplicate names, if so append a number to end.
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
     // delimiters. Curly brace is not really allowed un URLs, but a
380 380
     // more robust function would first check for these curly braces
381 381
     // in the path_to_ignore patterms, just in case.
382
-    if (preg_match('{' . $pi . '}', $path)) {
382
+    if (preg_match('{'.$pi.'}', $path)) {
383 383
       return TRUE;
384 384
     }
385 385
   }
@@ -505,15 +505,15 @@  discard block
 block discarded – undo
505 505
   elseif (!in_array($_GET['q'], $page_blacklist)) {
506 506
     watchdog('boincuser', 'The BOINC scheduling server settings are not yet
507 507
         configured. Please !verify for the settings to become effective.',
508
-          array('!verify' => l(t('verify the default values') . ' <strong>' .
509
-            t('and') . '</strong> ' . t('save the configuration'),
508
+          array('!verify' => l(t('verify the default values').' <strong>'.
509
+            t('and').'</strong> '.t('save the configuration'),
510 510
             'admin/boinc/scheduler', array('html' => TRUE))
511 511
           ), WATCHDOG_WARNING);
512 512
     if (user_access('administer site configuration')) {
513 513
       drupal_set_message(t('The BOINC scheduling server settings are not yet
514 514
           configured. Please !verify for the settings to become effective',
515
-            array('!verify' => l(t('verify the default values') . ' <strong>' .
516
-              t('and') . '</strong> ' . t('save the configuration'),
515
+            array('!verify' => l(t('verify the default values').' <strong>'.
516
+              t('and').'</strong> '.t('save the configuration'),
517 517
               'admin/boinc/scheduler', array('html' => TRUE))
518 518
             )), 'warning', FALSE);
519 519
     }
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
  */
576 576
 function _boincuser_node_profile_delete_submit($form, &$form_state) {
577 577
   $node = $form['#node'];
578
-  $deleteurl = 'node/'. $node->nid .'/delete';
578
+  $deleteurl = 'node/'.$node->nid.'/delete';
579 579
   $afterq = 'destination=account';
580 580
   drupal_goto($deleteurl, $afterq);
581 581
 }
@@ -605,8 +605,8 @@  discard block
 block discarded – undo
605 605
   $view = views_get_current_view();
606 606
   $account_id = $view->args[0];
607 607
   $friend_count = flag_friend_get_friend_count($account_id);
608
-  return '<h2 class="pane-title">' . bts('Friends (@count)',
609
-    array('@count' => $friend_count)) . '</h2>';
608
+  return '<h2 class="pane-title">'.bts('Friends (@count)',
609
+    array('@count' => $friend_count)).'</h2>';
610 610
 }
611 611
 
612 612
 /**
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
   $result = db_query_range("SELECT id,name FROM {user} WHERE name LIKE '%s%'", $string, 0, 10);
620 620
   db_set_active('default');
621 621
   while ($user = db_fetch_object($result)) {
622
-      $matches[$user->name . '_' . $user->id] = htmlentities($user->name) . " (" . $user->id . ')';
622
+      $matches[$user->name.'_'.$user->id] = htmlentities($user->name)." (".$user->id.')';
623 623
   }
624 624
 
625 625
   drupal_json((object)$matches);
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincimport/boincimport.pages.inc 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * Callback admin/boinc/import/settings
6 6
  */
7 7
 function boincimport_admin_settings() {
8
-  global $conf ;
8
+  global $conf;
9 9
   global $db_url;
10 10
   global $base_url;
11 11
   $stage = variable_get('boincimport_config_stage', 0);
@@ -27,17 +27,17 @@  discard block
 block discarded – undo
27 27
 
28 28
   $output = '';
29 29
   if (!variable_get('boincimport_tested', 0)) {
30
-    $form['test']['#collapsed']= FALSE;
30
+    $form['test']['#collapsed'] = FALSE;
31 31
     $output = '<span class="marker">';
32 32
     $ready_for_migration = 0;
33 33
   }
34
-  $output .= '<p>' . t('The migration will modify and even destroy some data. You
34
+  $output .= '<p>'.t('The migration will modify and even destroy some data. You
35 35
     must test this module on a copy of your data first, several times if necessary.
36 36
     Only use this module on your live data when you are familiar with the procedure
37
-    and you\'re confident everything will run smoothly.') . '</p><p>' . t('Also, you
37
+    and you\'re confident everything will run smoothly.').'</p><p>'.t('Also, you
38 38
     should make a full backup of your database just prior to performing the
39 39
     migration on the live data. It is better to turn off both the BOINC site and the
40
-    Drupal site during the migration.') . '</p>';
40
+    Drupal site during the migration.').'</p>';
41 41
   if (!variable_get('boincimport_tested', 0)) {
42 42
     $output .= '</span>';
43 43
   }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
   // Where is BOINC data?
57 57
   $pre = variable_get('boincimport_table_prefix', '');
58
-  $tables = array($pre .'forum', $pre .'post', $pre .'thread', $pre .'user');
58
+  $tables = array($pre.'forum', $pre.'post', $pre.'thread', $pre.'user');
59 59
   $db = (is_array($db_url) AND isset($db_url['boinc_rw'])) ? 'boinc_rw' : 'default';
60 60
   $result = _boincimport_check_tables($tables, $db, 0);
61 61
 
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
     $default_db_url = is_array($db_url) ? end($db_url) : $db_url;
80 80
     $url = variable_get('boincimport_db_url', $default_db_url);
81 81
     if (!preg_match('{(mysql|pgsql):\/\/(.+):(.*?)@(.+)/(\w+)}i', $url)) {
82
-      $output = '<p class="marker">'. t('Set the address of the BOINC database
83
-        according to the following format:') . '<br /><pre>
82
+      $output = '<p class="marker">'.t('Set the address of the BOINC database
83
+        according to the following format:').'<br /><pre>
84 84
         mysql://boinc_username:boinc_password@localhost/boinc_database
85 85
         </pre></p>';
86 86
       $ready_for_migration = 0;
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
     );
99 99
   }
100 100
 
101
-  $output = '<p>' . t('Note that due to a limitation within Drupal core, we cannot
101
+  $output = '<p>'.t('Note that due to a limitation within Drupal core, we cannot
102 102
     import messages from one database type to another database type. E.g, we
103 103
     cannot import BOINC from a myqsl DB, to a postgresql DB. You need to import
104 104
     the data into the same type of database first (import all the BOINC data, as is,
105
-    from mysql to postgresql).') . '</p><p>' . t('If both BOINC and Drupal are on
105
+    from mysql to postgresql).').'</p><p>'.t('If both BOINC and Drupal are on
106 106
     postgresql, see !this_issue.', array('!this_issue' => l(t('this issue'),
107
-    'http://drupal.org/node/64877', array('attributes' => array('target' => '_blank'))))) . '</p>';
107
+    'http://drupal.org/node/64877', array('attributes' => array('target' => '_blank'))))).'</p>';
108 108
   $form['boinc_data']['note'] = array('#value' => $output);
109 109
 
110 110
   // BOINC table prefix
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
   $output = $result['html'];
122 122
   if ($result['result'] != 1) {
123 123
     $ready_for_migration = 0;
124
-    $form['boinc_data']['#collapsed']= FALSE;
124
+    $form['boinc_data']['#collapsed'] = FALSE;
125 125
     $output .= '<span class="marker">';
126 126
     $output .= t('Some tables couldn\'t be found. Are the database settings correct?
127 127
       Please correct the errors so that the BOINC tables can be accessed.');
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
     '#collapsible' => TRUE,
170 170
     '#collapsed' => TRUE
171 171
   );
172
-  $output = '<p>'. t('Select which !input_format should be used for the imported
172
+  $output = '<p>'.t('Select which !input_format should be used for the imported
173 173
     messages. It is highly-recommended that this value be left as it is, as the
174 174
     Full HTML and PHP code formats can be very dangerous!',
175
-    array('!input_format' => l(t('input format'), 'admin/settings/filters'))) .'</p>';
175
+    array('!input_format' => l(t('input format'), 'admin/settings/filters'))).'</p>';
176 176
   $form['input']['intro'] = array('#value' => $output);
177 177
 
178 178
   $formats = db_query('SELECT format, name FROM {filter_formats}');
179 179
   while ($format = db_fetch_array($formats)) {
180
-    $input_formats[$format['format']]= $format['name'];
180
+    $input_formats[$format['format']] = $format['name'];
181 181
   }
182 182
 
183 183
   // By default, use the format named "Rich text"; fall back to Filtered HTML
@@ -194,10 +194,10 @@  discard block
 block discarded – undo
194 194
   );
195 195
   if (!$input_format) {
196 196
     $ready_for_migration = 0;
197
-    $form['input']['#collapsed']= FALSE;
197
+    $form['input']['#collapsed'] = FALSE;
198 198
   }
199
-  $output = '<p><em>'. t('This setting will be applied to all posts and private
200
-    messages.') .'</em></p>';
199
+  $output = '<p><em>'.t('This setting will be applied to all posts and private
200
+    messages.').'</em></p>';
201 201
   $form['input']['result'] = array('#value' => $output);
202 202
 
203 203
   // BBcode settings
@@ -208,23 +208,23 @@  discard block
 block discarded – undo
208 208
     '#collapsed' => TRUE,
209 209
   );
210 210
 
211
-  $output = '<p>' . t('BOINC posts are often formatted in BBcode. During the
212
-    import process, BBcode can be handled in two diffent ways') . ':</p>';
213
-  $output .= '<ul><li>' . t('Leave the BBcode as is and use the !bbcode_module
211
+  $output = '<p>'.t('BOINC posts are often formatted in BBcode. During the
212
+    import process, BBcode can be handled in two diffent ways').':</p>';
213
+  $output .= '<ul><li>'.t('Leave the BBcode as is and use the !bbcode_module
214 214
     after the migration to filter the imported posts. In this case, the module
215 215
     is not required during the migration, but will need to be installed and
216 216
     configured later.',
217 217
     array('!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode',
218
-    array('attributes' => array('target' => '_blank'))))) . '</li>';
219
-  $output .= '<li>' . t('Filter the BBcode now and replace it with plain HTML.
218
+    array('attributes' => array('target' => '_blank'))))).'</li>';
219
+  $output .= '<li>'.t('Filter the BBcode now and replace it with plain HTML.
220 220
     The BBcode module will be required during the migration process, but can
221
-    be disabled afterwards.') . '</li></ul>';
222
-  $output .= '<p>' . t('An appropriate input filter should be chosen, as well,
221
+    be disabled afterwards.').'</li></ul>';
222
+  $output .= '<p>'.t('An appropriate input filter should be chosen, as well,
223 223
     as it will affect how the post is displayed. For example, if BBcode is
224 224
     removed and replaced by HTML, some HTML tags will be stripped by the
225 225
     "Filtered HTML" input format unless they are first added to the list of
226 226
     allowed tags in that format. See the !input_formats page.',
227
-    array('!input_formats' => l(t('input formats'), 'admin/settings/filters'))) . '</p>';
227
+    array('!input_formats' => l(t('input formats'), 'admin/settings/filters'))).'</p>';
228 228
 
229 229
   $form['bbcode']['intro'] = array('#value' => $output);
230 230
   $form['bbcode']['boincimport_bbcode'] = array(
@@ -254,28 +254,28 @@  discard block
 block discarded – undo
254 254
     $result = db_query($sql, $input_format);
255 255
     if (!db_result($result)) {
256 256
       $form['bbcode']['#collapsed'] = FALSE;
257
-      $output .= '<p class="marker">'. t('You need to !enable_bbcode_input and
257
+      $output .= '<p class="marker">'.t('You need to !enable_bbcode_input and
258 258
         then !configure_bbcode_options', array(
259 259
           '!enable_bbcode_input' =>  l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
260
-          '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) .'</p>';
260
+          '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))).'</p>';
261 261
     }
262
-    $output .= '<p>'. t('For best results, !disable_all_options',
263
-    array('!disable_all_options' => l(t('all four BBcode configure options should be disabled'), "admin/settings/filters/{$input_format}/configure"))) . '.</p>';
262
+    $output .= '<p>'.t('For best results, !disable_all_options',
263
+    array('!disable_all_options' => l(t('all four BBcode configure options should be disabled'), "admin/settings/filters/{$input_format}/configure"))).'.</p>';
264 264
   } else {
265 265
     if ($bbcode_disabled) {
266 266
       $form['bbcode']['#collapsed'] = FALSE;
267
-      $output .= '<p>'. t('The !bbcode_module is recommended, but not required.
267
+      $output .= '<p>'.t('The !bbcode_module is recommended, but not required.
268 268
         You may !enable_bbcode after having installed it.', array(
269 269
           '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))),
270
-          '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))) .'</p>';
270
+          '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))).'</p>';
271 271
     }
272
-    $output .= '<p>' . t('Don\'t forget to !enable_bbcode_input and then !configure_bbcode_options.', array(
272
+    $output .= '<p>'.t('Don\'t forget to !enable_bbcode_input and then !configure_bbcode_options.', array(
273 273
       '!enable_bbcode_input' =>  l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
274
-      '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) . '</p>';
275
-    $output .= '<p>' . t('You may want to enable it for other input formats, too.') . '</p>';
274
+      '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))).'</p>';
275
+    $output .= '<p>'.t('You may want to enable it for other input formats, too.').'</p>';
276 276
   }
277
-  $output .= '<p><em>'. t('This setting will be applied to all posts, private
278
-    messages and the users\' signature.') .'</em></p>';
277
+  $output .= '<p><em>'.t('This setting will be applied to all posts, private
278
+    messages and the users\' signature.').'</em></p>';
279 279
 
280 280
   $form['bbcode']['result'] = array('#value' => $output);
281 281
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     '#collapsed' => TRUE,
288 288
   );
289 289
   if (!variable_get('boincimport_base_url_boinc', 0)) {
290
-    $form['url_transforms']['#collapsed']= FALSE;
290
+    $form['url_transforms']['#collapsed'] = FALSE;
291 291
     $output = '<span class="marker">';
292 292
     $ready_for_migration = 0;
293 293
   }
@@ -320,11 +320,11 @@  discard block
 block discarded – undo
320 320
   );
321 321
   variable_set('boincimport_ready', $ready_for_migration);
322 322
   if ($ready_for_migration) {
323
-    $output = '<p>'. t('Check the settings above one more time. If everything
324
-      is ok, !proceed.', array('!proceed' => l(t('you can now proceed with the migration'), 'admin/boinc/import/process'))) .'</p>';
323
+    $output = '<p>'.t('Check the settings above one more time. If everything
324
+      is ok, !proceed.', array('!proceed' => l(t('you can now proceed with the migration'), 'admin/boinc/import/process'))).'</p>';
325 325
   } else {
326
-    $output = '<p class="marker">'. t('You are not ready for the migration yet.
327
-      Please check the settings above.') .'</p>';
326
+    $output = '<p class="marker">'.t('You are not ready for the migration yet.
327
+      Please check the settings above.').'</p>';
328 328
   }
329 329
 
330 330
   $form['migration']['info'] = array('#value' => $output);
@@ -335,23 +335,23 @@  discard block
 block discarded – undo
335 335
  * Callback admin/boinc/import/post_configuration
336 336
  */
337 337
 function boincimport_post_configuration() {
338
-  $output = '<p>'. t('This page will help to tie up any loose ends following
338
+  $output = '<p>'.t('This page will help to tie up any loose ends following
339 339
     the BOINC data import process. Before continuing, it may be best to have
340
-    already:') .'</p>';
340
+    already:').'</p>';
341 341
   $output .= '<ul>';
342
-  $output .= '<li>'. t('Imported users, teams, and forums using the BOINC
343
-    import module') .'</li>';
344
-  $output .= '<li>'. t('Imported any additional data using add on modules if
345
-    available.') .'</li>';
342
+  $output .= '<li>'.t('Imported users, teams, and forums using the BOINC
343
+    import module').'</li>';
344
+  $output .= '<li>'.t('Imported any additional data using add on modules if
345
+    available.').'</li>';
346 346
   $output .= '</ul>';
347 347
   //User Set up
348
-  $output .= '<h2>'. t('User settings') .'</h2>';
349
-  $output .= '<p>'. t('Make sure your !user_settings are correct. Specifically,
348
+  $output .= '<h2>'.t('User settings').'</h2>';
349
+  $output .= '<p>'.t('Make sure your !user_settings are correct. Specifically,
350 350
     you can enable or disable signatures there. ', array(
351 351
       '!user_settings' => l(t('user settings'), 'admin/user/settings')
352
-    )) .'</p>';
353
-  $output .= '<p>' . t('Note that avatar/picture support is not tied to user
354
-    settings Picture support at this time.') . '</p>';
352
+    )).'</p>';
353
+  $output .= '<p>'.t('Note that avatar/picture support is not tied to user
354
+    settings Picture support at this time.').'</p>';
355 355
   /*$output .= '<p>' . t('In order to activate avatar/picture support, you need to
356 356
     enable pictures on this page and also:') . '</p>';
357 357
   $output .= '<ul>';
@@ -366,15 +366,15 @@  discard block
 block discarded – undo
366 366
   $output .= '</ul>'; */
367 367
 
368 368
   // Forum Set up
369
-  $output .= '<h2>'. t('Forum settings') .'</h2>';
370
-  $output .= '<p>'. t('Check any additional changes to make on the
369
+  $output .= '<h2>'.t('Forum settings').'</h2>';
370
+  $output .= '<p>'.t('Check any additional changes to make on the
371 371
     !forum_settings page.', array(
372 372
       '!forum_settings' =>  l(t('forum settings'), 'admin/content/forum/settings')
373
-    )) .'</p>';
374
-  $output .= '<p>'. t('It also may be a good idea to look at the !forum_list to
373
+    )).'</p>';
374
+  $output .= '<p>'.t('It also may be a good idea to look at the !forum_list to
375 375
     verify that all necessary containers and forums are in place.', array(
376 376
       '!forum_list' =>  l(t('forum list'), 'admin/content/forum')
377
-    )) .'</p>';
377
+    )).'</p>';
378 378
   /*$output .= '<p>'. t('If need be, set up the private forums as explained in the
379 379
     !documentation.', array(
380 380
       '!documentation' => l(t('documentation'), 'http://drupal.org/node/58969', array('attributes' => array('target' => '_blank')))
@@ -390,17 +390,17 @@  discard block
 block discarded – undo
390 390
   // BBcode
391 391
   $bbcode = variable_get('boincimport_bbcode', 0);
392 392
   if ($bbcode) {
393
-    $output .= '<h2>'. t('Remove BBcode module') .'</h2>';
394
-    $output .= '<p>'. t('The BBcode has been cleaned from the posts. You shouldn\'t
395
-      need the bbcode module anymore. You can disable it.') .'</p>';
393
+    $output .= '<h2>'.t('Remove BBcode module').'</h2>';
394
+    $output .= '<p>'.t('The BBcode has been cleaned from the posts. You shouldn\'t
395
+      need the bbcode module anymore. You can disable it.').'</p>';
396 396
   } else {
397
-    $output .= '<h2>'. t('Configure BBcode module') .'</h2>';
398
-    $output .= '<p>'. t('Most likely, there are many BOINC forum postings
397
+    $output .= '<h2>'.t('Configure BBcode module').'</h2>';
398
+    $output .= '<p>'.t('Most likely, there are many BOINC forum postings
399 399
       formatted in BBcode. It would be a good idea to verify that BBcode is
400 400
       being formatted correctly in the imported posts. Have a look around
401 401
       !the_forum.', array(
402 402
         '!the_forum' =>  l(t('the forum'), 'community')
403
-      )) . '</p>';
403
+      )).'</p>';
404 404
   }
405 405
 
406 406
   return $output;
@@ -445,11 +445,11 @@  discard block
 block discarded – undo
445 445
   $output .= '</ol>';
446 446
 
447 447
   // process will die() if the link to the BOINC database is wrong:
448
-  $output .= '<p>'. t('If the BOINC data is in another database, but you made a
448
+  $output .= '<p>'.t('If the BOINC data is in another database, but you made a
449 449
     mistake while setting up the data base url, you may be unable to access the
450 450
     setting page due to some limitations of the core of Drupal. !reset_db_url.', array(
451 451
       '!reset_db_url' => l(t('Click here to reset the database url'), 'admin/boinc/import/reset')
452
-    )) .'</p>';
452
+    )).'</p>';
453 453
 
454 454
   return $output;
455 455
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincimport/boincimport.module 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
   $boinc_db_url = (is_array($db_url)) ? (isset($db_url['boinc_rw']) ? $db_url['boinc_rw'] : $db_url['default']) : $db_url;
106 106
   variable_set('boincimport_db_url', $boinc_db_url);
107 107
   variable_set('boincimport_ready', 0);
108
-  return '<p>'. t('The BOINC database URL has been reset. You may now <a href="@configlink">go back to the configuration page</a>.',
109
-      array('@configlink' => url('admin/boinc/import/settings'))) .'</p>';
108
+  return '<p>'.t('The BOINC database URL has been reset. You may now <a href="@configlink">go back to the configuration page</a>.',
109
+      array('@configlink' => url('admin/boinc/import/settings'))).'</p>';
110 110
 }
111 111
 
112 112
 /**
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
  */
115 115
 function boincimport_unlock() {
116 116
   variable_del('boincimport_process_locked');
117
-  return '<p>'. t('The BOINC data import process has been unlocked. You may
117
+  return '<p>'.t('The BOINC data import process has been unlocked. You may
118 118
     now !proceed_with_import.', array(
119 119
       '!proceed_with_import' => l(t('proceed with the import'),
120 120
         'admin/boinc/import/process')
121
-    )) .'</p>';
121
+    )).'</p>';
122 122
 }
123 123
 
124 124
 /**
125 125
  * Callback admin/boinc/import/cleanup
126 126
  */
127 127
 function boincimport_cleanup() {
128
-  return boincimport_process_cleanup() .'<p>'. t('Drupal database cleaned.') .'</p>';
128
+  return boincimport_process_cleanup().'<p>'.t('Drupal database cleaned.').'</p>';
129 129
 }
130 130
 
131 131
 /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  * fails, the process will die() which is a bit too much since we only
139 139
  * want to test. Therefore, the test part of the code is not used, now.
140 140
  */
141
-function _boincimport_db_connect($test= 0) {
141
+function _boincimport_db_connect($test = 0) {
142 142
   global $db_url;
143 143
   $db_ready = variable_get('boincimport_db_configured', 1);
144 144
   if (!$db_ready) {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
       $db_url2['default'] = $db_url;
149 149
     }
150 150
     $db_url2['boinc_rw'] = variable_get('boincimport_db_url', $db_url);
151
-    $GLOBALS['db_url'] =& $db_url2;
151
+    $GLOBALS['db_url'] = & $db_url2;
152 152
     if ($test) {
153 153
       if (!db_connect($db_url2['boinc_rw'])) {
154 154
         return 0;
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
   $result = module_exists($module);
172 172
   $out['result'] = $result;
173 173
   if ($result == 1) {
174
-    $out['html'] .= '<li>'. t('Module %module is enabled. OK!', array('%module' => $module)) .'</li>';
174
+    $out['html'] .= '<li>'.t('Module %module is enabled. OK!', array('%module' => $module)).'</li>';
175 175
   }
176 176
   else {
177
-    $out['html'] .= '<li><span class="marker">'. t('Module %module is disabled.', array('%module' => $module)) .'</span></li>';
177
+    $out['html'] .= '<li><span class="marker">'.t('Module %module is disabled.', array('%module' => $module)).'</span></li>';
178 178
   }
179 179
   $out['html'] .= '</ul>';
180 180
   return $out;
@@ -187,32 +187,32 @@  discard block
 block discarded – undo
187 187
  *   $out['html'] = formatted html.
188 188
  *   $out['result'] = boolean.
189 189
  */
190
-function _boincimport_check_tables($tables = array(), $db = 'default' , $prefix = 1) {
190
+function _boincimport_check_tables($tables = array(), $db = 'default', $prefix = 1) {
191 191
   _boincimport_db_connect();
192 192
 
193 193
   $out['html'] = '<ul>';
194
-  $out['result']= 1;
194
+  $out['result'] = 1;
195 195
   foreach ($tables as $table) {
196 196
     if ($prefix) {
197
-      $table = db_prefix_tables('{'. $table .'}');
197
+      $table = db_prefix_tables('{'.$table.'}');
198 198
     }
199 199
 
200 200
     db_set_active($db);
201 201
     if ($GLOBALS['db_type'] == 'pgsql') {
202 202
       // adapt from db_table_exists in database.pgsql.inc
203
-      $result = (bool) db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '%s'", $table));
203
+      $result = (bool)db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '%s'", $table));
204 204
     }
205 205
     else {
206 206
       // adapt from db_table_exists in database.mysql.inc
207
-      $result = (bool) db_fetch_object(db_query("SHOW TABLES LIKE '%s'", $table));
207
+      $result = (bool)db_fetch_object(db_query("SHOW TABLES LIKE '%s'", $table));
208 208
     }
209 209
     db_set_active('default');
210 210
     if ($result) {
211
-      $out['html'] .= '<li>'. t('Table %table: OK!', array('%table' => $table)) .'</li>';
211
+      $out['html'] .= '<li>'.t('Table %table: OK!', array('%table' => $table)).'</li>';
212 212
     }
213 213
     else {
214
-      $out['html'] .= '<li><span class="marker">'. t('Table <strong>%table</strong> does not exist!', array('%table' => $table)) .'</span></li>';
215
-      $out['result']= 0;
214
+      $out['html'] .= '<li><span class="marker">'.t('Table <strong>%table</strong> does not exist!', array('%table' => $table)).'</span></li>';
215
+      $out['result'] = 0;
216 216
     }
217 217
   }
218 218
   $out['html'] .= '</ul>';
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
   boinc_get_path();
227 227
 
228 228
   if (!variable_get('boincimport_ready', 0)) {
229
-    return '<p>'. t('You cannot import the data now. Please <a href="@settings">complete the setup first</a>', array('@settings' => url('admin/boinc/import/settings'))) .'</p>';
229
+    return '<p>'.t('You cannot import the data now. Please <a href="@settings">complete the setup first</a>', array('@settings' => url('admin/boinc/import/settings'))).'</p>';
230 230
   }
231 231
 
232 232
   $output = 'BOINC import process form';
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 function boincimport_process_form() {
238 238
   $form = array();
239
-  _boincimport_db_connect() ;
239
+  _boincimport_db_connect();
240 240
   // Causes problems with form api redirect
241 241
   //ini_set('display_errors', TRUE);
242 242
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
       }
413 413
       else {
414 414
         drupal_set_message('Congratulations.  Import Finished');
415
-        drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
415
+        drupal_set_message('Please visit the '.l('Post migration configuration', 'admin/boinc/import/post_configuration').' page');
416 416
         watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO);
417 417
         unset($_SESSION['boincimport_stage_selected']);
418 418
       }
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
     $context['finished'] = 1;
634 634
   }
635 635
   else {
636
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
636
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
637 637
   }
638 638
 }
639 639
 
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
     // An error occurred.
663 663
     // $operations contains the operations that remained unprocessed.
664 664
     $error_operation = reset($operations);
665
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
665
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
666 666
   }
667 667
   drupal_set_message($message);
668 668
 
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
     $context['finished'] = 1;
847 847
   }
848 848
   else {
849
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
849
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
850 850
   }
851 851
 }
852 852
 
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
     // An error occurred.
874 874
     // $operations contains the operations that remained unprocessed.
875 875
     $error_operation = reset($operations);
876
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
876
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
877 877
   }
878 878
   drupal_set_message($message);
879 879
 
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
     $context['finished'] = 1;
1020 1020
   }
1021 1021
   else {
1022
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1022
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1023 1023
   }
1024 1024
 }
1025 1025
 
@@ -1047,7 +1047,7 @@  discard block
 block discarded – undo
1047 1047
     // An error occurred.
1048 1048
     // $operations contains the operations that remained unprocessed.
1049 1049
     $error_operation = reset($operations);
1050
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1050
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1051 1051
   }
1052 1052
   drupal_set_message($message);
1053 1053
 
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
     $context['finished'] = 1;
1204 1204
   }
1205 1205
   else {
1206
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1206
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1207 1207
   }
1208 1208
 }
1209 1209
 
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
     // An error occurred.
1233 1233
     // $operations contains the operations that remained unprocessed.
1234 1234
     $error_operation = reset($operations);
1235
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1235
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1236 1236
   }
1237 1237
   drupal_set_message($message);
1238 1238
 
@@ -1382,7 +1382,7 @@  discard block
 block discarded – undo
1382 1382
     $context['finished'] = 1;
1383 1383
   }
1384 1384
   else {
1385
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1385
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1386 1386
   }
1387 1387
 }
1388 1388
 
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
     // An error occurred.
1410 1410
     // $operations contains the operations that remained unprocessed.
1411 1411
     $error_operation = reset($operations);
1412
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1412
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1413 1413
   }
1414 1414
   drupal_set_message($message);
1415 1415
 
@@ -1710,7 +1710,7 @@  discard block
 block discarded – undo
1710 1710
     $context['finished'] = 1;
1711 1711
   }
1712 1712
   else {
1713
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1713
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1714 1714
   }
1715 1715
 }
1716 1716
 
@@ -1788,7 +1788,7 @@  discard block
 block discarded – undo
1788 1788
     $context['finished'] = 1;
1789 1789
   }
1790 1790
   else {
1791
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1791
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1792 1792
   }
1793 1793
 }
1794 1794
 
@@ -1801,34 +1801,34 @@  discard block
 block discarded – undo
1801 1801
   $forum_perms = array();
1802 1802
   $role_map = array_flip(user_roles());
1803 1803
   $forum_perms[$role_map['anonymous user']] = array(
1804
-    'view' => (int) !$hidden,
1804
+    'view' => (int)!$hidden,
1805 1805
     'update' => 0,
1806 1806
     'delete' => 0,
1807 1807
     'create' => 0,
1808 1808
   );
1809 1809
   $forum_perms[$role_map['authenticated user']] = array(
1810
-    'view' => (int) !$hidden,
1810
+    'view' => (int)!$hidden,
1811 1811
     'update' => 0,
1812 1812
     'delete' => 0,
1813 1813
     'create' => 0,
1814 1814
   );
1815 1815
   $forum_perms[$role_map['community member']] = array(
1816
-    'view' => (int) !$hidden,
1816
+    'view' => (int)!$hidden,
1817 1817
     'update' => 0,
1818 1818
     'delete' => 0,
1819
-    'create' => (int) $open,
1819
+    'create' => (int)$open,
1820 1820
   );
1821 1821
   $forum_perms[$role_map['verified contributor']] = array(
1822
-    'view' => (int) !$hidden,
1822
+    'view' => (int)!$hidden,
1823 1823
     'update' => 0,
1824 1824
     'delete' => 0,
1825
-    'create' => (int) !$hidden,
1825
+    'create' => (int)!$hidden,
1826 1826
   );
1827 1827
   $forum_perms[$role_map['moderator']] = array(
1828
-    'view' => (int) !$hidden,
1829
-    'update' => (int) !$hidden,
1828
+    'view' => (int)!$hidden,
1829
+    'update' => (int)!$hidden,
1830 1830
     'delete' => 0,
1831
-    'create' => (int) !$hidden,
1831
+    'create' => (int)!$hidden,
1832 1832
   );
1833 1833
   $forum_perms[$role_map['administrator']] = array(
1834 1834
     'view' => 1,
@@ -1893,7 +1893,7 @@  discard block
 block discarded – undo
1893 1893
     // An error occurred.
1894 1894
     // $operations contains the operations that remained unprocessed.
1895 1895
     $error_operation = reset($operations);
1896
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1896
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1897 1897
   }
1898 1898
   drupal_set_message($message);
1899 1899
 
@@ -1963,7 +1963,7 @@  discard block
 block discarded – undo
1963 1963
   $batch_size = 100;
1964 1964
 
1965 1965
   // Create batches to process
1966
-  for ($offset = 0; $offset < $topic_count; $offset+=$batch_size) {
1966
+  for ($offset = 0; $offset < $topic_count; $offset += $batch_size) {
1967 1967
     $topics_per_batch = $batch_size;
1968 1968
     if ($offset + $batch_size > $topic_count) {
1969 1969
       $topics_per_batch = $topic_count - $offset;
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
         'type' => $node_type,
2081 2081
         'title' => $topic->title,
2082 2082
         'uid' => $uid,
2083
-        'status' => ($topic->hidden) ? 0 : 1,  // published or not
2083
+        'status' => ($topic->hidden) ? 0 : 1, // published or not
2084 2084
         'promote' => $promote,
2085 2085
         'created' => $topic->create_time,
2086 2086
         'changed' => $topic->timestamp,
@@ -2094,7 +2094,7 @@  discard block
 block discarded – undo
2094 2094
       $node['tid'] = $tid;
2095 2095
 
2096 2096
       // Save the topic node
2097
-      $node = (object) $node; // node_save requires an object form
2097
+      $node = (object)$node; // node_save requires an object form
2098 2098
       node_save($node);
2099 2099
       taxonomy_node_save($node, array($tid));
2100 2100
       $success = ($node->nid) ? TRUE : FALSE;
@@ -2157,7 +2157,7 @@  discard block
 block discarded – undo
2157 2157
       $context['finished'] = 1;
2158 2158
     }
2159 2159
     else {
2160
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2160
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2161 2161
     }
2162 2162
   }
2163 2163
 }
@@ -2195,7 +2195,7 @@  discard block
 block discarded – undo
2195 2195
     // An error occurred.
2196 2196
     // $operations contains the operations that remained unprocessed.
2197 2197
     $error_operation = reset($operations);
2198
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2198
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2199 2199
   }
2200 2200
   drupal_set_message($message);
2201 2201
 
@@ -2271,7 +2271,7 @@  discard block
 block discarded – undo
2271 2271
   $batch_size = 100;
2272 2272
 
2273 2273
   // Create batches to process
2274
-  for ($offset = 0; $offset < $topic_count; $offset+=$batch_size) {
2274
+  for ($offset = 0; $offset < $topic_count; $offset += $batch_size) {
2275 2275
     $topics_per_batch = $batch_size;
2276 2276
     if ($offset + $batch_size > $topic_count) {
2277 2277
       $topics_per_batch = $topic_count - $offset;
@@ -2485,7 +2485,7 @@  discard block
 block discarded – undo
2485 2485
       $context['finished'] = 1;
2486 2486
     }
2487 2487
     else {
2488
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2488
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2489 2489
     }
2490 2490
   }
2491 2491
 }
@@ -2503,10 +2503,10 @@  discard block
 block discarded – undo
2503 2503
     $empty_posts = count($results['posts']['empty']);
2504 2504
     $failed_posts = count($results['posts']['failure']);
2505 2505
     $message = t(
2506
-      'Successfully imported @post_count posts in @topic_count topics ' .
2507
-      '(@skipped topics either had no replies or all replies were already imported, ' .
2508
-      '@duplicates posts were skipped as already imported, ' .
2509
-      '@empty_posts had no content, ' .
2506
+      'Successfully imported @post_count posts in @topic_count topics '.
2507
+      '(@skipped topics either had no replies or all replies were already imported, '.
2508
+      '@duplicates posts were skipped as already imported, '.
2509
+      '@empty_posts had no content, '.
2510 2510
       'and @error_posts encountered errors during import)',
2511 2511
       array(
2512 2512
         '@post_count' => $posts_imported,
@@ -2529,7 +2529,7 @@  discard block
 block discarded – undo
2529 2529
     // An error occurred.
2530 2530
     // $operations contains the operations that remained unprocessed.
2531 2531
     $error_operation = reset($operations);
2532
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2532
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2533 2533
   }
2534 2534
   drupal_set_message($message);
2535 2535
 
@@ -2699,7 +2699,7 @@  discard block
 block discarded – undo
2699 2699
     $context['finished'] = 1;
2700 2700
   }
2701 2701
   else {
2702
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2702
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2703 2703
   }
2704 2704
 }
2705 2705
 
@@ -2726,7 +2726,7 @@  discard block
 block discarded – undo
2726 2726
     // An error occurred.
2727 2727
     // $operations contains the operations that remained unprocessed.
2728 2728
     $error_operation = reset($operations);
2729
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2729
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2730 2730
   }
2731 2731
   drupal_set_message($message);
2732 2732
 
@@ -2908,7 +2908,7 @@  discard block
 block discarded – undo
2908 2908
         'type' => $node_type,
2909 2909
         'title' => $topic->title,
2910 2910
         'uid' => $uid,
2911
-        'status' => ($topic->hidden) ? 0 : 1,  // published or not
2911
+        'status' => ($topic->hidden) ? 0 : 1, // published or not
2912 2912
         'promote' => $promote,
2913 2913
         'created' => $topic->create_time,
2914 2914
         'changed' => $topic->timestamp,
@@ -2922,7 +2922,7 @@  discard block
 block discarded – undo
2922 2922
       );
2923 2923
 
2924 2924
       // Save the team topic node
2925
-      $node = (object) $node; // node_save requires an object form
2925
+      $node = (object)$node; // node_save requires an object form
2926 2926
       node_save($node);
2927 2927
 
2928 2928
       if ($node->nid) {
@@ -2968,7 +2968,7 @@  discard block
 block discarded – undo
2968 2968
     $context['finished'] = 1;
2969 2969
   }
2970 2970
   else {
2971
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2971
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2972 2972
   }
2973 2973
 }
2974 2974
 
@@ -2995,7 +2995,7 @@  discard block
 block discarded – undo
2995 2995
     // An error occurred.
2996 2996
     // $operations contains the operations that remained unprocessed.
2997 2997
     $error_operation = reset($operations);
2998
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2998
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2999 2999
   }
3000 3000
   drupal_set_message($message);
3001 3001
 
@@ -3250,7 +3250,7 @@  discard block
 block discarded – undo
3250 3250
     $context['finished'] = 1;
3251 3251
   }
3252 3252
   else {
3253
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3253
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3254 3254
   }
3255 3255
 }
3256 3256
 
@@ -3277,7 +3277,7 @@  discard block
 block discarded – undo
3277 3277
     // An error occurred.
3278 3278
     // $operations contains the operations that remained unprocessed.
3279 3279
     $error_operation = reset($operations);
3280
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
3280
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
3281 3281
   }
3282 3282
   drupal_set_message($message);
3283 3283
 
@@ -3399,7 +3399,7 @@  discard block
 block discarded – undo
3399 3399
     $context['finished'] = 1;
3400 3400
   }
3401 3401
   else {
3402
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3402
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3403 3403
   }
3404 3404
 }
3405 3405
 
@@ -3428,7 +3428,7 @@  discard block
 block discarded – undo
3428 3428
     // An error occurred.
3429 3429
     // $operations contains the operations that remained unprocessed.
3430 3430
     $error_operation = reset($operations);
3431
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
3431
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
3432 3432
   }
3433 3433
   drupal_set_message($message);
3434 3434
 
@@ -3504,7 +3504,7 @@  discard block
 block discarded – undo
3504 3504
   $batch_size = 100;
3505 3505
 
3506 3506
   // Create node batches to process
3507
-  for ($offset = 0; $offset < $node_count; $offset+=$batch_size) {
3507
+  for ($offset = 0; $offset < $node_count; $offset += $batch_size) {
3508 3508
     $nodes_per_batch = $batch_size;
3509 3509
     if ($offset + $batch_size > $node_count) {
3510 3510
       $nodes_per_batch = $node_count - $offset;
@@ -3516,7 +3516,7 @@  discard block
 block discarded – undo
3516 3516
     );
3517 3517
   }
3518 3518
   // Add comment batches
3519
-  for ($offset = 0; $offset < $comment_count; $offset+=$batch_size) {
3519
+  for ($offset = 0; $offset < $comment_count; $offset += $batch_size) {
3520 3520
     $comments_per_batch = $batch_size;
3521 3521
     if ($offset + $batch_size > $comment_count) {
3522 3522
       $comments_per_batch = $comment_count - $offset;
@@ -3528,7 +3528,7 @@  discard block
 block discarded – undo
3528 3528
     );
3529 3529
   }
3530 3530
   // And don't forget to process private messages
3531
-  for ($offset = 0; $offset < $pm_count; $offset+=$batch_size) {
3531
+  for ($offset = 0; $offset < $pm_count; $offset += $batch_size) {
3532 3532
     $messages_per_batch = $batch_size;
3533 3533
     if ($offset + $batch_size > $pm_count) {
3534 3534
       $messages_per_batch = $pm_count - $offset;
@@ -3617,7 +3617,7 @@  discard block
 block discarded – undo
3617 3617
       $context['finished'] = 1;
3618 3618
     }
3619 3619
     else {
3620
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3620
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3621 3621
     }
3622 3622
   }
3623 3623
 }
@@ -3681,7 +3681,7 @@  discard block
 block discarded – undo
3681 3681
       $context['finished'] = 1;
3682 3682
     }
3683 3683
     else {
3684
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3684
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3685 3685
     }
3686 3686
   }
3687 3687
 }
@@ -3744,7 +3744,7 @@  discard block
 block discarded – undo
3744 3744
       $context['finished'] = 1;
3745 3745
     }
3746 3746
     else {
3747
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3747
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3748 3748
     }
3749 3749
   }
3750 3750
 }
@@ -3813,7 +3813,7 @@  discard block
 block discarded – undo
3813 3813
     // An error occurred.
3814 3814
     // $operations contains the operations that remained unprocessed.
3815 3815
     $error_operation = reset($operations);
3816
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
3816
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
3817 3817
   }
3818 3818
   drupal_set_message($message);
3819 3819
 
@@ -3882,18 +3882,18 @@  discard block
 block discarded – undo
3882 3882
     $max = db_result(db_query('SELECT MAX(thread) FROM {comments} WHERE nid = %d', $edit['nid']));
3883 3883
     // Strip the "/" from the end of the thread.
3884 3884
     $max = rtrim($max, '/');
3885
-    $thread = int2vancode(vancode2int($max)+1) .'/';
3885
+    $thread = int2vancode(vancode2int($max) + 1).'/';
3886 3886
   } else {
3887 3887
     // This is comment with a parent comment: we increase the part of the thread
3888 3888
     // value at the proper depth.
3889 3889
     $parent = db_fetch_object(db_query('SELECT * FROM {comments} WHERE cid = %d', $edit['pid']));
3890 3890
     // Strip the "/" from the end of the parent thread.
3891
-    $parent->thread = (string) rtrim((string) $parent->thread, '/');
3891
+    $parent->thread = (string)rtrim((string)$parent->thread, '/');
3892 3892
     // Get the max value in _this_ thread.
3893 3893
     $max = db_result(db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE '%s.%%' AND nid = %d", $parent->thread, $edit['nid']));
3894 3894
     if ($max == '') {
3895 3895
       // First child of this parent.
3896
-      $thread = $parent->thread .'.'. int2vancode(1) .'/';
3896
+      $thread = $parent->thread.'.'.int2vancode(1).'/';
3897 3897
     } else {
3898 3898
       // Strip the "/" at the end of the thread.
3899 3899
       $max = rtrim($max, '/');
@@ -3902,14 +3902,14 @@  discard block
 block discarded – undo
3902 3902
       $parent_depth = count(explode('.', $parent->thread));
3903 3903
       $last = $parts[$parent_depth];
3904 3904
       // Finally, build the thread field for this new comment.
3905
-      $thread = $parent->thread .'.'. int2vancode(vancode2int($last) + 1) .'/';
3905
+      $thread = $parent->thread.'.'.int2vancode(vancode2int($last) + 1).'/';
3906 3906
     }
3907 3907
   }
3908 3908
 
3909 3909
   $status = 0; // 1 - not published, 0 - published
3910 3910
   $format = variable_get('boincimport_input_format', 0);
3911 3911
   $score = 0; // 0 default value, comments get higher score depending on the author's roles
3912
-  $users = serialize(array(0 => 1));  // default value for everybody!!
3912
+  $users = serialize(array(0 => 1)); // default value for everybody!!
3913 3913
 
3914 3914
   if ($edit['uid'] === $user->uid) { // '===' because we want to modify anonymous users too
3915 3915
     $edit['name'] = $user->name;
@@ -3943,7 +3943,7 @@  discard block
 block discarded – undo
3943 3943
   // BBcode to normal html
3944 3944
   if (variable_get('boincimport_bbcode', 0)) {
3945 3945
     $input_format = variable_get('boincimport_input_format', 0);
3946
-    $text = bbcode_filter('process', 0 , $input_format, $text);
3946
+    $text = bbcode_filter('process', 0, $input_format, $text);
3947 3947
   }
3948 3948
   return $text;
3949 3949
 }
Please login to merge, or discard this patch.