Passed
Push — master ( 4da011...8fb909 )
by Kevin
08:22 queued 12s
created
sites/all/features/boinc_standard/boinc_standard.features.menu_custom.inc 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_custom().
5 5
  */
6 6
 function boinc_standard_menu_default_menu_custom() {
7
-  $menus = array();
7
+    $menus = array();
8 8
 
9
-  // Exported menu: menu-footer-links
10
-  $menus['menu-footer-links'] = array(
9
+    // Exported menu: menu-footer-links
10
+    $menus['menu-footer-links'] = array(
11 11
     'menu_name' => 'menu-footer-links',
12 12
     'title' => 'Footer links',
13 13
     'description' => 'Auxiliary menu, typically at the bottom of the page in the footer, that includes links to content such as "about us" or "privacy policy" etc.',
14
-  );
15
-  // Translatables
16
-  // Title and description for footer menu appears in admin menu: Admin> Site Building> Menus
17
-  t('Auxiliary menu, typically at the bottom of the page in the footer, that includes links to content such as "about us" or "privacy policy" etc.');
18
-  t('Footer links');
14
+    );
15
+    // Translatables
16
+    // Title and description for footer menu appears in admin menu: Admin> Site Building> Menus
17
+    t('Auxiliary menu, typically at the bottom of the page in the footer, that includes links to content such as "about us" or "privacy policy" etc.');
18
+    t('Footer links');
19 19
 
20 20
 
21
-  return $menus;
21
+    return $menus;
22 22
 }
Please login to merge, or discard this patch.
sites/all/features/user_profiles/user_profiles.features.menu_links.inc 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_links().
5 5
  */
6 6
 function user_profiles_menu_default_menu_links() {
7
-  $menu_links = array();
7
+    $menu_links = array();
8 8
 
9
-  // Exported menu link: primary-links:account/profile
10
-  $menu_links['primary-links:account/profile'] = array(
9
+    // Exported menu link: primary-links:account/profile
10
+    $menu_links['primary-links:account/profile'] = array(
11 11
     'menu_name' => 'primary-links',
12 12
     'link_path' => 'account/profile',
13 13
     'router_path' => 'account/profile',
14 14
     'link_title' => 'Profile',
15 15
     'options' => array(
16
-      'attributes' => array(
16
+        'attributes' => array(
17 17
         'title' => '',
18
-      ),
18
+        ),
19 19
     ),
20 20
     'module' => 'menu',
21 21
     'hidden' => '0',
@@ -24,17 +24,17 @@  discard block
 block discarded – undo
24 24
     'expanded' => '0',
25 25
     'weight' => '-49',
26 26
     'parent_path' => 'dashboard',
27
-  );
28
-  // Exported menu link: primary-links:moderate/profiles
29
-  $menu_links['primary-links:moderate/profiles'] = array(
27
+    );
28
+    // Exported menu link: primary-links:moderate/profiles
29
+    $menu_links['primary-links:moderate/profiles'] = array(
30 30
     'menu_name' => 'primary-links',
31 31
     'link_path' => 'moderate/profiles',
32 32
     'router_path' => 'moderate/profiles',
33 33
     'link_title' => 'Queue',
34 34
     'options' => array(
35
-      'attributes' => array(
35
+        'attributes' => array(
36 36
         'title' => '',
37
-      ),
37
+        ),
38 38
     ),
39 39
     'module' => 'menu',
40 40
     'hidden' => '0',
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
     'expanded' => '0',
44 44
     'weight' => '-50',
45 45
     'parent_path' => 'moderate',
46
-  );
47
-  // Translatables
48
-  // Use bts() function to translate additional strings.
49
-  bts('Queue', array(), NULL, 'boinc:menu-link');
50
-  bts('Profile', array(), NULL, 'boinc:menu-link');
46
+    );
47
+    // Translatables
48
+    // Use bts() function to translate additional strings.
49
+    bts('Queue', array(), NULL, 'boinc:menu-link');
50
+    bts('Profile', array(), NULL, 'boinc:menu-link');
51 51
 
52
-  return $menu_links;
52
+    return $menu_links;
53 53
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
   );
47 47
   // Translatables
48 48
   // Use bts() function to translate additional strings.
49
-  bts('Queue', array(), NULL, 'boinc:menu-link');
50
-  bts('Profile', array(), NULL, 'boinc:menu-link');
49
+  bts('Queue', array(), null, 'boinc:menu-link');
50
+  bts('Profile', array(), null, 'boinc:menu-link');
51 51
 
52 52
   return $menu_links;
53 53
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/news/news.features.menu_links.inc 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_links().
5 5
  */
6 6
 function news_menu_default_menu_links() {
7
-  $menu_links = array();
7
+    $menu_links = array();
8 8
 
9
-  // Exported menu link: primary-links:news
10
-  $menu_links['primary-links:news'] = array(
9
+    // Exported menu link: primary-links:news
10
+    $menu_links['primary-links:news'] = array(
11 11
     'menu_name' => 'primary-links',
12 12
     'link_path' => 'news',
13 13
     'router_path' => 'news',
14 14
     'link_title' => 'News',
15 15
     'options' => array(
16
-      'attributes' => array(
16
+        'attributes' => array(
17 17
         'title' => '',
18
-      ),
19
-      'alter' => TRUE,
18
+        ),
19
+        'alter' => TRUE,
20 20
     ),
21 21
     'module' => 'menu',
22 22
     'hidden' => '0',
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
     'has_children' => '0',
25 25
     'expanded' => '1',
26 26
     'weight' => '-48',
27
-  );
28
-  // Translatables
29
-  // Use bts() function to translate additional strings.
30
-  bts('News', array(), NULL, 'boinc:menu-link');
27
+    );
28
+    // Translatables
29
+    // Use bts() function to translate additional strings.
30
+    bts('News', array(), NULL, 'boinc:menu-link');
31 31
 
32 32
 
33
-  return $menu_links;
33
+    return $menu_links;
34 34
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
       'attributes' => array(
17 17
         'title' => '',
18 18
       ),
19
-      'alter' => TRUE,
19
+      'alter' => true,
20 20
     ),
21 21
     'module' => 'menu',
22 22
     'hidden' => '0',
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
   );
28 28
   // Translatables
29 29
   // Use bts() function to translate additional strings.
30
-  bts('News', array(), NULL, 'boinc:menu-link');
30
+  bts('News', array(), null, 'boinc:menu-link');
31 31
 
32 32
 
33 33
   return $menu_links;
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincstats/boincstats.module 4 patches
Braces   +14 added lines, -18 removed lines patch added patch discarded remove patch
@@ -104,8 +104,7 @@  discard block
 block discarded – undo
104 104
   
105 105
   if ($myCache->isInCache($cache_name)) {
106 106
     $myCache->strokeFromCache($cache_name);
107
-  }
108
-  else {
107
+  } else {
109 108
     // Initialize dataset
110 109
     $dataset = array();
111 110
     $stats_xml = boincstats_get_project_stats('daily', $cpid);
@@ -114,9 +113,10 @@  discard block
 block discarded – undo
114 113
       for ($j = 30; $j < 90; $j++) {
115 114
         $dataset[] = (int) $stats_xml->records->record[$j];
116 115
       }
117
-    }
118
-    else {
119
-      for ($i = 0; $i <= $dataset_size; $i++) $dataset[] = 0;
116
+    } else {
117
+      for ($i = 0; $i <= $dataset_size; $i++) {
118
+          $dataset[] = 0;
119
+      }
120 120
     }
121 121
     
122 122
     // Get color configuration
@@ -226,8 +226,7 @@  discard block
 block discarded – undo
226 226
   
227 227
   if ($myCache->isInCache($cache_name)) {
228 228
     $myCache->strokeFromCache($cache_name);
229
-  }
230
-  else {
229
+  } else {
231 230
     // Initialize dataset
232 231
     $dataset = array();
233 232
     $stats_xml = boincstats_get_project_stats('daily');
@@ -236,9 +235,10 @@  discard block
 block discarded – undo
236 235
       for ($j = 30; $j < 90; $j++) {
237 236
         $dataset[] = (int) $stats_xml->records->record[$j];
238 237
       }
239
-    }
240
-    else {
241
-      for ($i = 0; $i <= 30; $i++) $dataset[] = 0;
238
+    } else {
239
+      for ($i = 0; $i <= 30; $i++) {
240
+          $dataset[] = 0;
241
+      }
242 242
     }
243 243
     
244 244
     // Create and populate the pData object
@@ -316,8 +316,7 @@  discard block
 block discarded – undo
316 316
           directory must be writeable by the web server.',
317 317
           array('@parent_dir' => dirname($cache_dir)), WATCHDOG_ERROR);
318 318
         return FALSE;
319
-      }
320
-      else {
319
+      } else {
321 320
         // Create the cache dir
322 321
         if (!mkdir($cache_dir, 0775)) {
323 322
           watchdog('boincstats', 'Failed to create @cache_dir directory. Check
@@ -326,8 +325,7 @@  discard block
 block discarded – undo
326 325
           return FALSE;
327 326
         }
328 327
       }
329
-    }
330
-    else {
328
+    } else {
331 329
       watchdog('boincstats', 'Cache directory at @cache_dir is not writeable.
332 330
         Please allow webserver write access.',
333 331
         array('@cache_dir' => $cache_dir), WATCHDOG_ERROR);
@@ -370,8 +368,7 @@  discard block
 block discarded – undo
370 368
   foreach ($get as $arg => $value) {
371 369
     if ($value !== NULL) {
372 370
       $args[] = "{$arg}=" . rawurlencode($value);
373
-    }
374
-    else {
371
+    } else {
375 372
       $args[] = $arg;
376 373
     }
377 374
   }
@@ -467,8 +464,7 @@  discard block
 block discarded – undo
467 464
       drupal_set_message(t('The BOINC stats system is not configured. Please
468 465
         !configure_it', array('!configure_it' => l(t('configure it now'),
469 466
           'admin/boinc/stats'))), 'error', FALSE);
470
-    }
471
-    else {
467
+    } else {
472 468
       drupal_set_message(t('There is a problem with the site. Please contact
473 469
         the system administrator.'), 'error', FALSE);
474 470
     }
Please login to merge, or discard this patch.
Indentation   +179 added lines, -179 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 // $Id$
3 3
 
4 4
 /**
5
-  * @file
6
-  * Enable BOINC charting features for statistics
7
-  */
5
+ * @file
6
+ * Enable BOINC charting features for statistics
7
+ */
8 8
 
9 9
 
10 10
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
19 19
 
20 20
 /**
21
-  * Implementation of hook_menu().
22
-  */
21
+ * Implementation of hook_menu().
22
+ */
23 23
 function boincstats_menu() {
24
-  $items['admin/boinc/stats'] = array(
24
+    $items['admin/boinc/stats'] = array(
25 25
     'title' => 'Environment: Statistics setup',
26 26
     'description' => 'Configure the stats system for generating charts and 
27 27
       providing cross project data.',
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
     'access arguments' => array('administer site configuration'),
31 31
     'type' => MENU_NORMAL_ITEM,
32 32
     'file' => 'boincstats.admin.inc'
33
-  );
34
-  $items['charts/user'] = array(
33
+    );
34
+    $items['charts/user'] = array(
35 35
     'page callback' => 'boincstats_get_user_stats_chart',
36 36
     'access arguments' => array('access content'),
37 37
     'type' => MENU_CALLBACK
38
-  );
39
-  $items['charts/project'] = array(
38
+    );
39
+    $items['charts/project'] = array(
40 40
     'page callback' => 'boincstats_get_project_stats_chart',
41 41
     'access arguments' => array('access content'),
42 42
     'type' => MENU_CALLBACK
43
-  );
44
-  return $items;
43
+    );
44
+    return $items;
45 45
 }
46 46
 
47 47
 
@@ -50,31 +50,31 @@  discard block
 block discarded – undo
50 50
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
51 51
  
52 52
 /**
53
-  * User stats chart menu callback
54
-  * Called to generate the daily credit status chart for a user (dashboard)
55
-  */
53
+ * User stats chart menu callback
54
+ * Called to generate the daily credit status chart for a user (dashboard)
55
+ */
56 56
 function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
57 57
   
58
-  // pChart library inclusions
59
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pData.class');
60
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pDraw.class');
61
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pImage.class');
62
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pCache.class');
58
+    // pChart library inclusions
59
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pData.class');
60
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pDraw.class');
61
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pImage.class');
62
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pCache.class');
63 63
   
64
-  init_theme();
65
-  global $theme_key;
66
-  $cache_name = "{$theme_key}_";
64
+    init_theme();
65
+    global $theme_key;
66
+    $cache_name = "{$theme_key}_";
67 67
   
68
-  $dataset_size = 0;
69
-  $chart_height = 0;
70
-  $chart_width = 0;
71
-  $draw_x_lines = FALSE;
72
-  $label_x_axis = FALSE;
68
+    $dataset_size = 0;
69
+    $chart_height = 0;
70
+    $chart_width = 0;
71
+    $draw_x_lines = FALSE;
72
+    $label_x_axis = FALSE;
73 73
   
74
-  $stats_xml = NULL;
74
+    $stats_xml = NULL;
75 75
   
76
-  switch($chart_size) {
77
-  case 'small':
76
+    switch($chart_size) {
77
+    case 'small':
78 78
     $cache_name .= "{$cpid}_small";
79 79
     $dataset_size = 30;
80 80
     $chart_height = 80;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     $draw_x_lines = FALSE;
84 84
     $label_x_axis = FALSE;
85 85
     break;
86
-  case 'medium':
86
+    case 'medium':
87 87
   default:
88 88
     $cache_name .= $cpid;
89 89
     $dataset_size = 60;
@@ -91,32 +91,32 @@  discard block
 block discarded – undo
91 91
     $chart_width = 589;
92 92
     $draw_x_lines = TRUE;
93 93
     $label_x_axis = TRUE;
94
-  }
94
+    }
95 95
   
96
-  // Sanity check for cache directory
97
-  if (!boincstats_check_cache_dir()) {
96
+    // Sanity check for cache directory
97
+    if (!boincstats_check_cache_dir()) {
98 98
     return;
99
-  }
99
+    }
100 100
   
101
-  // Initialize the cache object and flush stale images
102
-  $myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
103
-  $myCache->removeOlderThan(60*60*24);
101
+    // Initialize the cache object and flush stale images
102
+    $myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
103
+    $myCache->removeOlderThan(60*60*24);
104 104
   
105
-  if ($myCache->isInCache($cache_name)) {
105
+    if ($myCache->isInCache($cache_name)) {
106 106
     $myCache->strokeFromCache($cache_name);
107
-  }
108
-  else {
107
+    }
108
+    else {
109 109
     // Initialize dataset
110 110
     $dataset = array();
111 111
     $stats_xml = boincstats_get_project_stats('daily', $cpid);
112 112
     if ($stats_xml) {
113
-      // Get the last 60 days of stats for the chart
114
-      for ($j = 30; $j < 90; $j++) {
113
+        // Get the last 60 days of stats for the chart
114
+        for ($j = 30; $j < 90; $j++) {
115 115
         $dataset[] = (int) $stats_xml->records->record[$j];
116
-      }
116
+        }
117 117
     }
118 118
     else {
119
-      for ($i = 0; $i <= $dataset_size; $i++) $dataset[] = 0;
119
+        for ($i = 0; $i <= $dataset_size; $i++) $dataset[] = 0;
120 120
     }
121 121
     
122 122
     // Get color configuration
@@ -145,39 +145,39 @@  discard block
 block discarded – undo
145 145
     // Define the chart area
146 146
     $myPicture->setGraphArea(0, 3, $chart_width, $chart_height);
147 147
     if ($backdrop_color) {
148
-      $myPicture->drawFilledRectangle(0, 0, $chart_width, $chart_height, $backdrop_color);
148
+        $myPicture->drawFilledRectangle(0, 0, $chart_width, $chart_height, $backdrop_color);
149 149
     }
150 150
     
151 151
     // Draw the scale
152 152
     $scaleSettings = array(
153
-      'Mode' => SCALE_MODE_START0,
154
-      'DrawYLines' => false,
155
-      'DrawXLines' => $draw_x_lines,
156
-      'GridTicks' => 2,
157
-      'LabelSkip' => 9,
158
-      'SkippedAxisAlpha' => 0,
159
-      'SkippedInnerTickWidth' => 0,
160
-      'SkippedOuterTickWidth' => 0,
161
-      'AxisAlpha' => 0,
162
-      'InnerTickWidth' => 0,
163
-      'OuterTickWidth' => 0,
164
-      'XMargin' => 1,
165
-      'YMargin' => 0,
166
-      'Floating' => TRUE,
167
-      'GridR' => 200,
168
-      'GridG' => 200,
169
-      'GridB' => 200,
170
-      'DrawSubTicks' => false,
171
-      'CycleBackground' => false
153
+        'Mode' => SCALE_MODE_START0,
154
+        'DrawYLines' => false,
155
+        'DrawXLines' => $draw_x_lines,
156
+        'GridTicks' => 2,
157
+        'LabelSkip' => 9,
158
+        'SkippedAxisAlpha' => 0,
159
+        'SkippedInnerTickWidth' => 0,
160
+        'SkippedOuterTickWidth' => 0,
161
+        'AxisAlpha' => 0,
162
+        'InnerTickWidth' => 0,
163
+        'OuterTickWidth' => 0,
164
+        'XMargin' => 1,
165
+        'YMargin' => 0,
166
+        'Floating' => TRUE,
167
+        'GridR' => 200,
168
+        'GridG' => 200,
169
+        'GridB' => 200,
170
+        'DrawSubTicks' => false,
171
+        'CycleBackground' => false
172 172
     );
173 173
     $myPicture->setFontProperties(array('FontSize' => 10));
174 174
     $myPicture->drawScale($scaleSettings);
175 175
     
176 176
     if ($label_x_axis) {
177
-      for ($i = 5; $i >= 0; $i--) {
177
+        for ($i = 5; $i >= 0; $i--) {
178 178
         $label = ($i) ? -10*$i : 'Today';
179 179
         $myPicture->drawText(589-587*($i/6)-5, 2, $label, array('Align' => TEXT_ALIGN_TOPRIGHT));
180
-      }
180
+        }
181 181
     }
182 182
 
183 183
     // Draw the area chart
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     // Render the picture (choose the best way)
190 190
     //$myPicture->autoOutput('pictures/example.drawAreaChart.simple.png');
191 191
     $myPicture->stroke();
192
-  }
192
+    }
193 193
 }
194 194
 
195 195
 /**
@@ -197,48 +197,48 @@  discard block
 block discarded – undo
197 197
  * Called to generate the daily credit status chart for the whole project
198 198
  */
199 199
 function boincstats_get_project_stats_chart() {
200
-  // pChart library inclusions
201
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pData.class');
202
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pDraw.class');
203
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pImage.class');
204
-  module_load_include('php', 'boincstats', 'includes/pchart/class/pCache.class');
200
+    // pChart library inclusions
201
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pData.class');
202
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pDraw.class');
203
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pImage.class');
204
+    module_load_include('php', 'boincstats', 'includes/pchart/class/pCache.class');
205 205
   
206
-  init_theme();
207
-  global $theme_key;
208
-  $cache_name = "{$theme_key}_project_chart";
206
+    init_theme();
207
+    global $theme_key;
208
+    $cache_name = "{$theme_key}_project_chart";
209 209
   
210
-  $color_keys = array('R', 'G', 'B');
210
+    $color_keys = array('R', 'G', 'B');
211 211
   
212
-  // Get color configuration
213
-  $palette_color_hex = theme_get_setting('boinc_stats_chart_color');
214
-  $palette_color = array_combine($color_keys, sscanf($palette_color_hex, "#%02x%02x%02x"));
215
-  $backdrop_color_hex = theme_get_setting('boinc_stats_chart_bcolor');
216
-  $backdrop_color = array_combine($color_keys, sscanf($backdrop_color_hex, "#%02x%02x%02x"));
212
+    // Get color configuration
213
+    $palette_color_hex = theme_get_setting('boinc_stats_chart_color');
214
+    $palette_color = array_combine($color_keys, sscanf($palette_color_hex, "#%02x%02x%02x"));
215
+    $backdrop_color_hex = theme_get_setting('boinc_stats_chart_bcolor');
216
+    $backdrop_color = array_combine($color_keys, sscanf($backdrop_color_hex, "#%02x%02x%02x"));
217 217
    
218
-  // Sanity check for cache directory
219
-  if (!boincstats_check_cache_dir()) {
218
+    // Sanity check for cache directory
219
+    if (!boincstats_check_cache_dir()) {
220 220
     return;
221
-  }
221
+    }
222 222
   
223
-  // Initialize the cache object and flush stale images
224
-  $myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
225
-  $myCache->removeOlderThan(60*60*24);
223
+    // Initialize the cache object and flush stale images
224
+    $myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
225
+    $myCache->removeOlderThan(60*60*24);
226 226
   
227
-  if ($myCache->isInCache($cache_name)) {
227
+    if ($myCache->isInCache($cache_name)) {
228 228
     $myCache->strokeFromCache($cache_name);
229
-  }
230
-  else {
229
+    }
230
+    else {
231 231
     // Initialize dataset
232 232
     $dataset = array();
233 233
     $stats_xml = boincstats_get_project_stats('daily');
234 234
     if ($stats_xml) {
235
-      // Get the last 60 days of stats for the chart
236
-      for ($j = 30; $j < 90; $j++) {
235
+        // Get the last 60 days of stats for the chart
236
+        for ($j = 30; $j < 90; $j++) {
237 237
         $dataset[] = (int) $stats_xml->records->record[$j];
238
-      }
238
+        }
239 239
     }
240 240
     else {
241
-      for ($i = 0; $i <= 30; $i++) $dataset[] = 0;
241
+        for ($i = 0; $i <= 30; $i++) $dataset[] = 0;
242 242
     }
243 243
     
244 244
     // Create and populate the pData object
@@ -263,25 +263,25 @@  discard block
 block discarded – undo
263 263
 
264 264
     // Draw the scale
265 265
     $scaleSettings = array(
266
-      'Mode' => SCALE_MODE_START0,
267
-      'DrawYLines' => false,
268
-      'DrawXLines' => false,
269
-      'GridTicks' => 2,
270
-      'LabelSkip' => 9,
271
-      'SkippedAxisAlpha' => 0,
272
-      'SkippedInnerTickWidth' => 0,
273
-      'SkippedOuterTickWidth' => 0,
274
-      'AxisAlpha' => 0,
275
-      'InnerTickWidth' => 0,
276
-      'OuterTickWidth' => 0,
277
-      'XMargin' => 1,
278
-      'YMargin' => 0,
279
-      'Floating' => TRUE,
280
-      'GridR' => 200,
281
-      'GridG' => 200,
282
-      'GridB' => 200,
283
-      'DrawSubTicks' => false,
284
-      'CycleBackground' => false
266
+        'Mode' => SCALE_MODE_START0,
267
+        'DrawYLines' => false,
268
+        'DrawXLines' => false,
269
+        'GridTicks' => 2,
270
+        'LabelSkip' => 9,
271
+        'SkippedAxisAlpha' => 0,
272
+        'SkippedInnerTickWidth' => 0,
273
+        'SkippedOuterTickWidth' => 0,
274
+        'AxisAlpha' => 0,
275
+        'InnerTickWidth' => 0,
276
+        'OuterTickWidth' => 0,
277
+        'XMargin' => 1,
278
+        'YMargin' => 0,
279
+        'Floating' => TRUE,
280
+        'GridR' => 200,
281
+        'GridG' => 200,
282
+        'GridB' => 200,
283
+        'DrawSubTicks' => false,
284
+        'CycleBackground' => false
285 285
     );
286 286
     $myPicture->setFontProperties(array('FontSize' => 10));
287 287
     $myPicture->drawScale($scaleSettings);
@@ -300,41 +300,41 @@  discard block
 block discarded – undo
300 300
     // Render the picture (choose the best way)
301 301
     //$myPicture->autoOutput('pictures/example.drawAreaChart.simple.png');
302 302
     $myPicture->stroke();
303
-  }
303
+    }
304 304
 }
305 305
 
306 306
 /*
307 307
  *
308 308
  */
309 309
 function boincstats_check_cache_dir($cache_path = 'files/cache') {
310
-  $cache_dir = realpath('.') . '/' . conf_path() . '/' . $cache_path;
311
-  if (!is_writeable($cache_dir)) {
310
+    $cache_dir = realpath('.') . '/' . conf_path() . '/' . $cache_path;
311
+    if (!is_writeable($cache_dir)) {
312 312
     if (!is_dir($cache_dir)) {
313
-      if (!is_writeable(dirname($cache_dir))) {
313
+        if (!is_writeable(dirname($cache_dir))) {
314 314
         // If the parent "files" dir isn't even writeable...
315 315
         watchdog('boincstats', '@parent_dir directory is not writeable. This
316 316
           directory must be writeable by the web server.',
317
-          array('@parent_dir' => dirname($cache_dir)), WATCHDOG_ERROR);
317
+            array('@parent_dir' => dirname($cache_dir)), WATCHDOG_ERROR);
318 318
         return FALSE;
319
-      }
320
-      else {
319
+        }
320
+        else {
321 321
         // Create the cache dir
322 322
         if (!mkdir($cache_dir, 0775)) {
323
-          watchdog('boincstats', 'Failed to create @cache_dir directory. Check
323
+            watchdog('boincstats', 'Failed to create @cache_dir directory. Check
324 324
             filesystem permissions...?',
325 325
             array('@cache_dir' => $cache_dir), WATCHDOG_ERROR);
326
-          return FALSE;
326
+            return FALSE;
327
+        }
327 328
         }
328
-      }
329 329
     }
330 330
     else {
331
-      watchdog('boincstats', 'Cache directory at @cache_dir is not writeable.
331
+        watchdog('boincstats', 'Cache directory at @cache_dir is not writeable.
332 332
         Please allow webserver write access.',
333 333
         array('@cache_dir' => $cache_dir), WATCHDOG_ERROR);
334
-      return FALSE;
334
+        return FALSE;
335 335
     }
336
-  }
337
-  return TRUE;
336
+    }
337
+    return TRUE;
338 338
 }
339 339
 
340 340
 /*
@@ -342,87 +342,87 @@  discard block
 block discarded – undo
342 342
  */
343 343
 function boincstats_get_project_stats($type = 'total', $cpid = NULL) {
344 344
   
345
-  // Determine the stats environment
346
-  boincstats_check_configuration();
347
-  $stats_server = variable_get('boinc_stats_server', '');
348
-  $stats_rpc = variable_get('boinc_stats_project_credit_history_rpc', '');
349
-  $project_id = variable_get('boinc_stats_remote_project_id', '');
345
+    // Determine the stats environment
346
+    boincstats_check_configuration();
347
+    $stats_server = variable_get('boinc_stats_server', '');
348
+    $stats_rpc = variable_get('boinc_stats_project_credit_history_rpc', '');
349
+    $project_id = variable_get('boinc_stats_remote_project_id', '');
350 350
   
351
-  $get = array(
351
+    $get = array(
352 352
     'id' => $project_id
353
-  );
354
-  switch ($type) {
355
-  case 'daily':
353
+    );
354
+    switch ($type) {
355
+    case 'daily':
356 356
     $get['daily'] = NULL;
357 357
     break;
358
-  case 'total':
358
+    case 'total':
359 359
   default:
360 360
   }
361 361
   
362
-  if ($cpid) {
362
+    if ($cpid) {
363 363
     // If a user CPID has been provided, limit scope to that user
364 364
     $stats_rpc = variable_get('boinc_stats_user_credit_history_rpc', '');
365 365
     $get['cpid'] = $cpid;
366
-  }
366
+    }
367 367
   
368
-  // Construct query string
369
-  $args = array();
370
-  foreach ($get as $arg => $value) {
368
+    // Construct query string
369
+    $args = array();
370
+    foreach ($get as $arg => $value) {
371 371
     if ($value !== NULL) {
372
-      $args[] = "{$arg}=" . rawurlencode($value);
372
+        $args[] = "{$arg}=" . rawurlencode($value);
373 373
     }
374 374
     else {
375
-      $args[] = $arg;
375
+        $args[] = $arg;
376 376
     }
377
-  }
378
-  $query = '?' . implode('&', $args);
377
+    }
378
+    $query = '?' . implode('&', $args);
379 379
   
380
-  // Load XML from RPC
381
-  $stats_xml = NULL;
382
-  $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
383
-  $result = drupal_http_request($target_url);
384
-  if (in_array($result->code, array(200, 304))) {
380
+    // Load XML from RPC
381
+    $stats_xml = NULL;
382
+    $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
383
+    $result = drupal_http_request($target_url);
384
+    if (in_array($result->code, array(200, 304))) {
385 385
     $stats_xml = simplexml_load_string($result->data);
386
-  }
387
-  watchdog('boincstats', $target_url);
388
-  return $stats_xml;
386
+    }
387
+    watchdog('boincstats', $target_url);
388
+    return $stats_xml;
389 389
 }
390 390
 
391 391
 /*
392 392
  *
393 393
  */
394 394
 function boincstats_get_project_total_credit() {
395
-  $stats_xml = boincstats_get_project_stats();
396
-  $last_record = end($stats_xml->records->record);
397
-  return ($last_record) ? (int) $last_record : 0;
395
+    $stats_xml = boincstats_get_project_stats();
396
+    $last_record = end($stats_xml->records->record);
397
+    return ($last_record) ? (int) $last_record : 0;
398 398
 }
399 399
 
400 400
 /*
401 401
  *
402 402
  */
403 403
 function boincstats_get_project_avg_credit() {
404
-  $stats_xml = boincstats_get_project_stats();
405
-  return (isset($stats_xml->recent_avg)) ? $stats_xml->recent_avg : 0;
404
+    $stats_xml = boincstats_get_project_stats();
405
+    return (isset($stats_xml->recent_avg)) ? $stats_xml->recent_avg : 0;
406 406
 }
407 407
 
408 408
 /*
409 409
  *
410 410
  */
411 411
 function boincstats_credit_to_ghours($credit) {
412
-  return $credit / (100 * 365);
412
+    return $credit / (100 * 365);
413 413
 }
414 414
 
415 415
 /*
416 416
  *
417 417
  */
418 418
 function boincstats_credit_to_flops($credit, $prefix = 0) {
419
-  $factor = array(
419
+    $factor = array(
420 420
     '0' => 0,
421 421
     'g' => 3,
422 422
     't' => 6,
423 423
     'p' => 9
424
-  );
425
-  return $credit / (pow(10, (int) $factor[$prefix]) / 10);
424
+    );
425
+    return $credit / (pow(10, (int) $factor[$prefix]) / 10);
426 426
 }
427 427
 
428 428
 
@@ -431,22 +431,22 @@  discard block
 block discarded – undo
431 431
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
432 432
 
433 433
 function boincstats_get_project_stats_overview($type = 'basic') {
434
-  global $base_path;
435
-  $output = '';
436
-  switch ($type) {
437
-  case 'basic':
434
+    global $base_path;
435
+    $output = '';
436
+    switch ($type) {
437
+    case 'basic':
438 438
     $output .= '<div class="overlay"><span>(' . bts('Credits per day', array(), NULL, 'boinc:front-page') . ')</span></div>' . "\n";
439 439
     $output .= '<div class="chart"><img src="' . $base_path . 'charts/project" /></div>' . "\n";
440 440
     break;
441
-  case 'detailed':
441
+    case 'detailed':
442 442
     $output .= '<div class="stats"><label>' . bts('Total G-hours', array(), NULL, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_ghours(boincstats_get_project_total_credit())) . '</span></div>' . "\n";
443 443
     $output .= '<div class="stats"><label>' . bts('Avg TFlops', array(), NULL, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_flops(boincstats_get_project_avg_credit(), 't')) . '</span></div>' . "\n";
444 444
     //$output .= '<div class="stats"><a href="#">' . bts('Pending credits', array(), NULL, 'boinc:front-page') . '</a></div>' . "\n";
445 445
     $output .= '<div class="chart"><img src="' . $base_path . 'charts/project" /></div>' . "\n";
446 446
     break;
447
-  default:
447
+    default:
448 448
   }
449
-  return $output;
449
+    return $output;
450 450
 }
451 451
 
452 452
 
@@ -458,19 +458,19 @@  discard block
 block discarded – undo
458 458
  * Check that the stats system is configured, report if it isn't
459 459
  */
460 460
 function boincstats_check_configuration() {
461
-  $project_id = variable_get('boinc_stats_remote_project_id', '');
462
-  if (!$project_id) {
461
+    $project_id = variable_get('boinc_stats_remote_project_id', '');
462
+    if (!$project_id) {
463 463
     watchdog('boincstats', 'The BOINC stats system is not configured. Please
464 464
         !configure_it', array('!configure_it' => l(t('configure it now'),
465
-          'admin/boinc/stats')), WATCHDOG_ERROR);
465
+            'admin/boinc/stats')), WATCHDOG_ERROR);
466 466
     if (user_access('administer site configuration')) {
467
-      drupal_set_message(t('The BOINC stats system is not configured. Please
467
+        drupal_set_message(t('The BOINC stats system is not configured. Please
468 468
         !configure_it', array('!configure_it' => l(t('configure it now'),
469
-          'admin/boinc/stats'))), 'error', FALSE);
469
+            'admin/boinc/stats'))), 'error', FALSE);
470 470
     }
471 471
     else {
472
-      drupal_set_message(t('There is a problem with the site. Please contact
472
+        drupal_set_message(t('There is a problem with the site. Please contact
473 473
         the system administrator.'), 'error', FALSE);
474 474
     }
475
-  }
475
+    }
476 476
 }
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
   
74 74
   $stats_xml = NULL;
75 75
   
76
-  switch($chart_size) {
76
+  switch ($chart_size) {
77 77
   case 'small':
78 78
     $cache_name .= "{$cpid}_small";
79 79
     $dataset_size = 30;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
   }
100 100
   
101 101
   // Initialize the cache object and flush stale images
102
-  $myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
102
+  $myCache = new pCache(array('CacheFolder' => realpath('.').'/'.conf_path().'/files/cache'));
103 103
   $myCache->removeOlderThan(60*60*24);
104 104
   
105 105
   if ($myCache->isInCache($cache_name)) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     if ($stats_xml) {
113 113
       // Get the last 60 days of stats for the chart
114 114
       for ($j = 30; $j < 90; $j++) {
115
-        $dataset[] = (int) $stats_xml->records->record[$j];
115
+        $dataset[] = (int)$stats_xml->records->record[$j];
116 116
       }
117 117
     }
118 118
     else {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     
132 132
     $MyData->addPoints($dataset, 'series1');
133 133
     $MyData->setPalette('series1', $palette_color);
134
-    $MyData->setAxisPosition(0,AXIS_POSITION_RIGHT);
134
+    $MyData->setAxisPosition(0, AXIS_POSITION_RIGHT);
135 135
     
136 136
     // Create the pChart object
137 137
     $myPicture = new pImage($chart_width, $chart_height, $MyData);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     if ($label_x_axis) {
177 177
       for ($i = 5; $i >= 0; $i--) {
178 178
         $label = ($i) ? -10*$i : 'Today';
179
-        $myPicture->drawText(589-587*($i/6)-5, 2, $label, array('Align' => TEXT_ALIGN_TOPRIGHT));
179
+        $myPicture->drawText(589 - 587*($i/6) - 5, 2, $label, array('Align' => TEXT_ALIGN_TOPRIGHT));
180 180
       }
181 181
     }
182 182
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
   }
222 222
   
223 223
   // Initialize the cache object and flush stale images
224
-  $myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
224
+  $myCache = new pCache(array('CacheFolder' => realpath('.').'/'.conf_path().'/files/cache'));
225 225
   $myCache->removeOlderThan(60*60*24);
226 226
   
227 227
   if ($myCache->isInCache($cache_name)) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     if ($stats_xml) {
235 235
       // Get the last 60 days of stats for the chart
236 236
       for ($j = 30; $j < 90; $j++) {
237
-        $dataset[] = (int) $stats_xml->records->record[$j];
237
+        $dataset[] = (int)$stats_xml->records->record[$j];
238 238
       }
239 239
     }
240 240
     else {
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
     
247 247
     $MyData->addPoints($dataset, 'series1');
248 248
     $MyData->setPalette('series1', $palette_color);
249
-    $MyData->setAxisPosition(0,AXIS_POSITION_RIGHT);
249
+    $MyData->setAxisPosition(0, AXIS_POSITION_RIGHT);
250 250
 
251 251
     // Create the pChart object
252
-    $myPicture = new pImage(266,80,$MyData);
252
+    $myPicture = new pImage(266, 80, $MyData);
253 253
 
254 254
     // Turn on Antialiasing
255 255
     $myPicture->Antialias = true;
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
     //$myPicture->setFontProperties(array('FontName' => '../fonts/pf_arma_five.ttf','FontSize' => 6));
259 259
 
260 260
     // Define the chart area
261
-    $myPicture->setGraphArea(0,0,266,80);
262
-    $myPicture->drawFilledRectangle(0,0,266,80,$backdrop_color);
261
+    $myPicture->setGraphArea(0, 0, 266, 80);
262
+    $myPicture->drawFilledRectangle(0, 0, 266, 80, $backdrop_color);
263 263
 
264 264
     // Draw the scale
265 265
     $scaleSettings = array(
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
  *
308 308
  */
309 309
 function boincstats_check_cache_dir($cache_path = 'files/cache') {
310
-  $cache_dir = realpath('.') . '/' . conf_path() . '/' . $cache_path;
310
+  $cache_dir = realpath('.').'/'.conf_path().'/'.$cache_path;
311 311
   if (!is_writeable($cache_dir)) {
312 312
     if (!is_dir($cache_dir)) {
313 313
       if (!is_writeable(dirname($cache_dir))) {
@@ -369,13 +369,13 @@  discard block
 block discarded – undo
369 369
   $args = array();
370 370
   foreach ($get as $arg => $value) {
371 371
     if ($value !== NULL) {
372
-      $args[] = "{$arg}=" . rawurlencode($value);
372
+      $args[] = "{$arg}=".rawurlencode($value);
373 373
     }
374 374
     else {
375 375
       $args[] = $arg;
376 376
     }
377 377
   }
378
-  $query = '?' . implode('&', $args);
378
+  $query = '?'.implode('&', $args);
379 379
   
380 380
   // Load XML from RPC
381 381
   $stats_xml = NULL;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 function boincstats_get_project_total_credit() {
395 395
   $stats_xml = boincstats_get_project_stats();
396 396
   $last_record = end($stats_xml->records->record);
397
-  return ($last_record) ? (int) $last_record : 0;
397
+  return ($last_record) ? (int)$last_record : 0;
398 398
 }
399 399
 
400 400
 /*
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
  *
410 410
  */
411 411
 function boincstats_credit_to_ghours($credit) {
412
-  return $credit / (100 * 365);
412
+  return $credit/(100*365);
413 413
 }
414 414
 
415 415
 /*
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
     't' => 6,
423 423
     'p' => 9
424 424
   );
425
-  return $credit / (pow(10, (int) $factor[$prefix]) / 10);
425
+  return $credit/(pow(10, (int)$factor[$prefix])/10);
426 426
 }
427 427
 
428 428
 
@@ -435,14 +435,14 @@  discard block
 block discarded – undo
435 435
   $output = '';
436 436
   switch ($type) {
437 437
   case 'basic':
438
-    $output .= '<div class="overlay"><span>(' . bts('Credits per day', array(), NULL, 'boinc:front-page') . ')</span></div>' . "\n";
439
-    $output .= '<div class="chart"><img src="' . $base_path . 'charts/project" /></div>' . "\n";
438
+    $output .= '<div class="overlay"><span>('.bts('Credits per day', array(), NULL, 'boinc:front-page').')</span></div>'."\n";
439
+    $output .= '<div class="chart"><img src="'.$base_path.'charts/project" /></div>'."\n";
440 440
     break;
441 441
   case 'detailed':
442
-    $output .= '<div class="stats"><label>' . bts('Total G-hours', array(), NULL, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_ghours(boincstats_get_project_total_credit())) . '</span></div>' . "\n";
443
-    $output .= '<div class="stats"><label>' . bts('Avg TFlops', array(), NULL, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_flops(boincstats_get_project_avg_credit(), 't')) . '</span></div>' . "\n";
442
+    $output .= '<div class="stats"><label>'.bts('Total G-hours', array(), NULL, 'boinc:front-page').': </label><span>'.number_format(boincstats_credit_to_ghours(boincstats_get_project_total_credit())).'</span></div>'."\n";
443
+    $output .= '<div class="stats"><label>'.bts('Avg TFlops', array(), NULL, 'boinc:front-page').': </label><span>'.number_format(boincstats_credit_to_flops(boincstats_get_project_avg_credit(), 't')).'</span></div>'."\n";
444 444
     //$output .= '<div class="stats"><a href="#">' . bts('Pending credits', array(), NULL, 'boinc:front-page') . '</a></div>' . "\n";
445
-    $output .= '<div class="chart"><img src="' . $base_path . 'charts/project" /></div>' . "\n";
445
+    $output .= '<div class="chart"><img src="'.$base_path.'charts/project" /></div>'."\n";
446 446
     break;
447 447
   default:
448 448
   }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
   $dataset_size = 0;
69 69
   $chart_height = 0;
70 70
   $chart_width = 0;
71
-  $draw_x_lines = FALSE;
72
-  $label_x_axis = FALSE;
71
+  $draw_x_lines = false;
72
+  $label_x_axis = false;
73 73
   
74
-  $stats_xml = NULL;
74
+  $stats_xml = null;
75 75
   
76 76
   switch($chart_size) {
77 77
   case 'small':
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
     $chart_height = 80;
81 81
     $chart_width = 266;
82 82
     //$backdrop_color = array('R'=>238,'G'=>238,'B'=>238);
83
-    $draw_x_lines = FALSE;
84
-    $label_x_axis = FALSE;
83
+    $draw_x_lines = false;
84
+    $label_x_axis = false;
85 85
     break;
86 86
   case 'medium':
87 87
   default:
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
     $dataset_size = 60;
90 90
     $chart_height = 155;
91 91
     $chart_width = 589;
92
-    $draw_x_lines = TRUE;
93
-    $label_x_axis = TRUE;
92
+    $draw_x_lines = true;
93
+    $label_x_axis = true;
94 94
   }
95 95
   
96 96
   // Sanity check for cache directory
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
       'OuterTickWidth' => 0,
164 164
       'XMargin' => 1,
165 165
       'YMargin' => 0,
166
-      'Floating' => TRUE,
166
+      'Floating' => true,
167 167
       'GridR' => 200,
168 168
       'GridG' => 200,
169 169
       'GridB' => 200,
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
       'OuterTickWidth' => 0,
277 277
       'XMargin' => 1,
278 278
       'YMargin' => 0,
279
-      'Floating' => TRUE,
279
+      'Floating' => true,
280 280
       'GridR' => 200,
281 281
       'GridG' => 200,
282 282
       'GridB' => 200,
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         watchdog('boincstats', '@parent_dir directory is not writeable. This
316 316
           directory must be writeable by the web server.',
317 317
           array('@parent_dir' => dirname($cache_dir)), WATCHDOG_ERROR);
318
-        return FALSE;
318
+        return false;
319 319
       }
320 320
       else {
321 321
         // Create the cache dir
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
           watchdog('boincstats', 'Failed to create @cache_dir directory. Check
324 324
             filesystem permissions...?',
325 325
             array('@cache_dir' => $cache_dir), WATCHDOG_ERROR);
326
-          return FALSE;
326
+          return false;
327 327
         }
328 328
       }
329 329
     }
@@ -331,16 +331,16 @@  discard block
 block discarded – undo
331 331
       watchdog('boincstats', 'Cache directory at @cache_dir is not writeable.
332 332
         Please allow webserver write access.',
333 333
         array('@cache_dir' => $cache_dir), WATCHDOG_ERROR);
334
-      return FALSE;
334
+      return false;
335 335
     }
336 336
   }
337
-  return TRUE;
337
+  return true;
338 338
 }
339 339
 
340 340
 /*
341 341
  *
342 342
  */
343
-function boincstats_get_project_stats($type = 'total', $cpid = NULL) {
343
+function boincstats_get_project_stats($type = 'total', $cpid = null) {
344 344
   
345 345
   // Determine the stats environment
346 346
   boincstats_check_configuration();
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
   );
354 354
   switch ($type) {
355 355
   case 'daily':
356
-    $get['daily'] = NULL;
356
+    $get['daily'] = null;
357 357
     break;
358 358
   case 'total':
359 359
   default:
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
   // Construct query string
369 369
   $args = array();
370 370
   foreach ($get as $arg => $value) {
371
-    if ($value !== NULL) {
371
+    if ($value !== null) {
372 372
       $args[] = "{$arg}=" . rawurlencode($value);
373 373
     }
374 374
     else {
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
   $query = '?' . implode('&', $args);
379 379
   
380 380
   // Load XML from RPC
381
-  $stats_xml = NULL;
381
+  $stats_xml = null;
382 382
   $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
383 383
   $result = drupal_http_request($target_url);
384 384
   if (in_array($result->code, array(200, 304))) {
@@ -435,12 +435,12 @@  discard block
 block discarded – undo
435 435
   $output = '';
436 436
   switch ($type) {
437 437
   case 'basic':
438
-    $output .= '<div class="overlay"><span>(' . bts('Credits per day', array(), NULL, 'boinc:front-page') . ')</span></div>' . "\n";
438
+    $output .= '<div class="overlay"><span>(' . bts('Credits per day', array(), null, 'boinc:front-page') . ')</span></div>' . "\n";
439 439
     $output .= '<div class="chart"><img src="' . $base_path . 'charts/project" /></div>' . "\n";
440 440
     break;
441 441
   case 'detailed':
442
-    $output .= '<div class="stats"><label>' . bts('Total G-hours', array(), NULL, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_ghours(boincstats_get_project_total_credit())) . '</span></div>' . "\n";
443
-    $output .= '<div class="stats"><label>' . bts('Avg TFlops', array(), NULL, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_flops(boincstats_get_project_avg_credit(), 't')) . '</span></div>' . "\n";
442
+    $output .= '<div class="stats"><label>' . bts('Total G-hours', array(), null, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_ghours(boincstats_get_project_total_credit())) . '</span></div>' . "\n";
443
+    $output .= '<div class="stats"><label>' . bts('Avg TFlops', array(), null, 'boinc:front-page') . ': </label><span>' . number_format(boincstats_credit_to_flops(boincstats_get_project_avg_credit(), 't')) . '</span></div>' . "\n";
444 444
     //$output .= '<div class="stats"><a href="#">' . bts('Pending credits', array(), NULL, 'boinc:front-page') . '</a></div>' . "\n";
445 445
     $output .= '<div class="chart"><img src="' . $base_path . 'charts/project" /></div>' . "\n";
446 446
     break;
@@ -466,11 +466,11 @@  discard block
 block discarded – undo
466 466
     if (user_access('administer site configuration')) {
467 467
       drupal_set_message(t('The BOINC stats system is not configured. Please
468 468
         !configure_it', array('!configure_it' => l(t('configure it now'),
469
-          'admin/boinc/stats'))), 'error', FALSE);
469
+          'admin/boinc/stats'))), 'error', false);
470 470
     }
471 471
     else {
472 472
       drupal_set_message(t('There is a problem with the site. Please contact
473
-        the system administrator.'), 'error', FALSE);
473
+        the system administrator.'), 'error', false);
474 474
     }
475 475
   }
476 476
 }
Please login to merge, or discard this patch.
html/user/per_app_list.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     echo "</tr>";
59 59
 
60 60
     echo "<tr>";
61
-    echo "<th>" . tra("Rank") . "</th><th>" . tra("Name") . "</th>\n";
61
+    echo "<th>".tra("Rank")."</th><th>".tra("Name")."</th>\n";
62 62
     foreach ($apps as $app) {
63 63
         for ($i = 0; $i < 2; $i++) {
64 64
             $x = col_title($is_team, $app, $appid, $is_total, $i);
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
78 78
     echo "<tr>";
79 79
     echo "<td>$i</td>";
80 80
 
81
-    echo "<td>" . $item[0][$x] . "</td>";
81
+    echo "<td>".$item[0][$x]."</td>";
82 82
     $y = 1;
83 83
     foreach ($apps as $app) {
84 84
         $z = 0;
85
-        echo "<td>" . format_credit($item[$y][$x][$z]) . "</td>";
85
+        echo "<td>".format_credit($item[$y][$x][$z])."</td>";
86 86
         $z++;
87
-        echo "<td>" . format_credit_large($item[$y][$x][$z]) . "</td>";
87
+        echo "<td>".format_credit_large($item[$y][$x][$z])."</td>";
88 88
         $y++;
89 89
     }
90 90
     echo "</tr>";
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
 
180 180
     if ($is_team) {
181 181
 
182
-        $data  = BoincCreditTeam::get_list("appid=$appid", $x, $offset . ", " . $items_per_page);
182
+        $data  = BoincCreditTeam::get_list("appid=$appid", $x, $offset.", ".$items_per_page);
183 183
         $store = retrieve_credit_team($data);
184 184
     } else {
185
-        $data  = BoincCreditUser::get_list("appid=$appid", $x, $offset . ", " . $items_per_page);
185
+        $data  = BoincCreditUser::get_list("appid=$appid", $x, $offset.", ".$items_per_page);
186 186
         $store = retrieve_credit_user($data);
187 187
     }
188 188
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
 if (!$offset)
199 199
     $offset = 0;
200
-if ($offset % $items_per_page)
200
+if ($offset%$items_per_page)
201 201
     $offset = 0;
202 202
 
203 203
 $x = $is_team ? tra("Top teams by application") : tra("Top participants by application");
@@ -245,12 +245,12 @@  discard block
 block discarded – undo
245 245
 
246 246
 if ($offset > 0) {
247 247
     $new_offset = $offset - $items_per_page;
248
-    echo "<a href=per_app_list.php?appid=$appid&is_team=$is_team&is_total=$is_total&offset=$new_offset>" . tra("Previous %1", $items_per_page) . "</a> &middot; ";
248
+    echo "<a href=per_app_list.php?appid=$appid&is_team=$is_team&is_total=$is_total&offset=$new_offset>".tra("Previous %1", $items_per_page)."</a> &middot; ";
249 249
 }
250 250
 
251 251
 if (sizeof($data[0]) == $items_per_page) {
252 252
     $new_offset = $offset + $items_per_page;
253
-    echo "<a href=per_app_list.php?appid=$appid&is_team=$is_team&is_total=$is_total&offset=$new_offset>" . tra("Next %1", $items_per_page) . "</a>";
253
+    echo "<a href=per_app_list.php?appid=$appid&is_team=$is_team&is_total=$is_total&offset=$new_offset>".tra("Next %1", $items_per_page)."</a>";
254 254
 }
255 255
 
256 256
 page_tail();
Please login to merge, or discard this patch.
sites/all/features/boinc_standard/boinc_standard.features.menu_links.inc 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_links().
5 5
  */
6 6
 function boinc_standard_menu_default_menu_links() {
7
-  $menu_links = array();
7
+    $menu_links = array();
8 8
 
9
-  // Exported menu link: menu-footer-links:https://boinc.berkeley.edu/
10
-  $menu_links['menu-footer-links:https://boinc.berkeley.edu/'] = array(
9
+    // Exported menu link: menu-footer-links:https://boinc.berkeley.edu/
10
+    $menu_links['menu-footer-links:https://boinc.berkeley.edu/'] = array(
11 11
     'menu_name' => 'menu-footer-links',
12 12
     'link_path' => 'https://boinc.berkeley.edu/',
13 13
     'router_path' => '',
14 14
     'link_title' => 'BOINC',
15 15
     'options' => array(
16
-      'attributes' => array(
16
+        'attributes' => array(
17 17
         'title' => '',
18
-      ),
18
+        ),
19 19
     ),
20 20
     'module' => 'menu',
21 21
     'hidden' => '0',
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
     'has_children' => '0',
24 24
     'expanded' => '0',
25 25
     'weight' => '10',
26
-  );
27
-  // Exported menu link: primary-links:<front>
28
-  $menu_links['primary-links:<front>'] = array(
26
+    );
27
+    // Exported menu link: primary-links:<front>
28
+    $menu_links['primary-links:<front>'] = array(
29 29
     'menu_name' => 'primary-links',
30 30
     'link_path' => '<front>',
31 31
     'router_path' => '',
32 32
     'link_title' => 'Home',
33 33
     'options' => array(
34
-      'attributes' => array(
34
+        'attributes' => array(
35 35
         'title' => '',
36
-      ),
36
+        ),
37 37
     ),
38 38
     'module' => 'menu',
39 39
     'hidden' => '0',
@@ -41,17 +41,17 @@  discard block
 block discarded – undo
41 41
     'has_children' => '0',
42 42
     'expanded' => '0',
43 43
     'weight' => '-50',
44
-  );
45
-  // Exported menu link: primary-links:dashboard
46
-  $menu_links['primary-links:dashboard'] = array(
44
+    );
45
+    // Exported menu link: primary-links:dashboard
46
+    $menu_links['primary-links:dashboard'] = array(
47 47
     'menu_name' => 'primary-links',
48 48
     'link_path' => 'dashboard',
49 49
     'router_path' => 'dashboard',
50 50
     'link_title' => 'Dashboard',
51 51
     'options' => array(
52
-      'attributes' => array(
52
+        'attributes' => array(
53 53
         'title' => '',
54
-      ),
54
+        ),
55 55
     ),
56 56
     'module' => 'menu',
57 57
     'hidden' => '0',
@@ -60,17 +60,17 @@  discard block
 block discarded – undo
60 60
     'expanded' => '0',
61 61
     'weight' => '-50',
62 62
     'parent_path' => 'dashboard',
63
-  );
64
-  // Exported menu link: primary-links:user/me/edit
65
-  $menu_links['primary-links:user/me/edit'] = array(
63
+    );
64
+    // Exported menu link: primary-links:user/me/edit
65
+    $menu_links['primary-links:user/me/edit'] = array(
66 66
     'menu_name' => 'primary-links',
67 67
     'link_path' => 'user/me/edit',
68 68
     'router_path' => 'user/%/edit',
69 69
     'link_title' => 'Credentials',
70 70
     'options' => array(
71
-      'attributes' => array(
71
+        'attributes' => array(
72 72
         'title' => '',
73
-      ),
73
+        ),
74 74
     ),
75 75
     'module' => 'menu',
76 76
     'hidden' => '0',
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
     'expanded' => '0',
80 80
     'weight' => '-48',
81 81
     'parent_path' => 'dashboard',
82
-  );
83
-  // Translatables
84
-  // Use bts() function to translate additional strings.
85
-  bts('Home', array(), NULL, 'boinc:menu-link');
86
-  bts('Credentials', array(), NULL, 'boinc:menu-link');
87
-  bts('Dashboard', array(), NULL, 'boinc:menu-link');
82
+    );
83
+    // Translatables
84
+    // Use bts() function to translate additional strings.
85
+    bts('Home', array(), NULL, 'boinc:menu-link');
86
+    bts('Credentials', array(), NULL, 'boinc:menu-link');
87
+    bts('Dashboard', array(), NULL, 'boinc:menu-link');
88 88
 
89
-  return $menu_links;
89
+    return $menu_links;
90 90
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@
 block discarded – undo
82 82
   );
83 83
   // Translatables
84 84
   // Use bts() function to translate additional strings.
85
-  bts('Home', array(), NULL, 'boinc:menu-link');
86
-  bts('Credentials', array(), NULL, 'boinc:menu-link');
87
-  bts('Dashboard', array(), NULL, 'boinc:menu-link');
85
+  bts('Home', array(), null, 'boinc:menu-link');
86
+  bts('Credentials', array(), null, 'boinc:menu-link');
87
+  bts('Dashboard', array(), null, 'boinc:menu-link');
88 88
 
89 89
   return $menu_links;
90 90
 }
Please login to merge, or discard this patch.
all/features/user_preferences/user_preferences.features.menu_links.inc 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_links().
5 5
  */
6 6
 function user_preferences_menu_default_menu_links() {
7
-  $menu_links = array();
7
+    $menu_links = array();
8 8
 
9
-  // Exported menu link: primary-links:account/prefs
10
-  $menu_links['primary-links:account/prefs'] = array(
9
+    // Exported menu link: primary-links:account/prefs
10
+    $menu_links['primary-links:account/prefs'] = array(
11 11
     'menu_name' => 'primary-links',
12 12
     'link_path' => 'account/prefs',
13 13
     'router_path' => 'account/prefs',
14 14
     'link_title' => 'Preferences',
15 15
     'options' => array(
16
-      'attributes' => array(
16
+        'attributes' => array(
17 17
         'title' => '',
18
-      ),
18
+        ),
19 19
     ),
20 20
     'module' => 'menu',
21 21
     'hidden' => '0',
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     'expanded' => '0',
25 25
     'weight' => '-47',
26 26
     'parent_path' => 'dashboard',
27
-  );
28
-  // Translatables
29
-  // Use bts() function to translate additional strings.
30
-  bts('Preferences', array(), NULL, 'boinc:menu-link');
31
-  bts('Community', array(), NULL, 'boinc:menu-link');
32
-  bts('Privacy', array(), NULL, 'boinc:menu-link');
33
-  bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
27
+    );
28
+    // Translatables
29
+    // Use bts() function to translate additional strings.
30
+    bts('Preferences', array(), NULL, 'boinc:menu-link');
31
+    bts('Community', array(), NULL, 'boinc:menu-link');
32
+    bts('Privacy', array(), NULL, 'boinc:menu-link');
33
+    bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
34 34
 
35
-  return $menu_links;
35
+    return $menu_links;
36 36
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
   );
28 28
   // Translatables
29 29
   // Use bts() function to translate additional strings.
30
-  bts('Preferences', array(), NULL, 'boinc:menu-link');
31
-  bts('Community', array(), NULL, 'boinc:menu-link');
32
-  bts('Privacy', array(), NULL, 'boinc:menu-link');
33
-  bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
30
+  bts('Preferences', array(), null, 'boinc:menu-link');
31
+  bts('Community', array(), null, 'boinc:menu-link');
32
+  bts('Privacy', array(), null, 'boinc:menu-link');
33
+  bts('Subscriptions', array(), null, 'boinc:menu-link:-1:ignoreoverwrite');
34 34
 
35 35
   return $menu_links;
36 36
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/user_profiles/user_profiles.views_default.inc 2 patches
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $view->base_table = 'node';
15 15
   $view->core = 6;
16 16
   $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
17
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
18 18
   $handler = $view->new_display('default', 'Defaults', 'default');
19 19
   $handler->override_option('fields', array(
20 20
     'title' => array(
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
       'operator' => '=',
159 159
       'value' => '1',
160 160
       'group' => '0',
161
-      'exposed' => FALSE,
161
+      'exposed' => false,
162 162
       'expose' => array(
163
-        'operator' => FALSE,
163
+        'operator' => false,
164 164
         'label' => '',
165 165
       ),
166 166
       'id' => 'moderate',
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
   $handler->override_option('cache', array(
179 179
     'type' => 'none',
180 180
   ));
181
-  $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page'));
181
+  $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), null, 'boinc:moderate-user-page'));
182 182
   $handler->override_option('empty_format', '4');
183 183
   $handler->override_option('use_pager', '1');
184 184
   $handler->override_option('style_plugin', 'table');
@@ -324,9 +324,9 @@  discard block
 block discarded – undo
324 324
       'operator' => '=',
325 325
       'value' => '1',
326 326
       'group' => '0',
327
-      'exposed' => FALSE,
327
+      'exposed' => false,
328 328
       'expose' => array(
329
-        'operator' => FALSE,
329
+        'operator' => false,
330 330
         'label' => '',
331 331
       ),
332 332
       'id' => 'moderate',
@@ -343,9 +343,9 @@  discard block
 block discarded – undo
343 343
         'profile' => 'profile',
344 344
       ),
345 345
       'group' => '0',
346
-      'exposed' => FALSE,
346
+      'exposed' => false,
347 347
       'expose' => array(
348
-        'operator' => FALSE,
348
+        'operator' => false,
349 349
         'label' => '',
350 350
       ),
351 351
       'id' => 'type',
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
       'relationship' => 'none',
358 358
     ),
359 359
   ));
360
-  $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page'));
360
+  $handler->override_option('title', bts('User profile moderation queue', array(), null, 'boinc:moderate-user-page'));
361 361
   $handler->override_option('path', 'moderate/profiles');
362 362
   $handler->override_option('menu', array(
363 363
     'type' => 'default tab',
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
   $view->base_table = 'node_revisions';
385 385
   $view->core = 6;
386 386
   $view->api_version = '2';
387
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
387
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
388 388
   $handler = $view->new_display('default', 'Defaults', 'default');
389 389
   $handler->override_option('relationships', array(
390 390
     'uid' => array(
Please login to merge, or discard this patch.
Indentation   +403 added lines, -403 removed lines patch added patch discarded remove patch
@@ -4,22 +4,22 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_views_default_views().
5 5
  */
6 6
 function user_profiles_views_default_views() {
7
-  $views = array();
7
+    $views = array();
8 8
 
9
-  // Exported view: moderation_queue
10
-  $view = new view;
11
-  $view->name = 'moderation_queue';
12
-  $view->description = '';
13
-  $view->tag = '';
14
-  $view->base_table = 'node';
15
-  $view->core = 6;
16
-  $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
-  $handler = $view->new_display('default', 'Defaults', 'default');
19
-  $handler->override_option('fields', array(
9
+    // Exported view: moderation_queue
10
+    $view = new view;
11
+    $view->name = 'moderation_queue';
12
+    $view->description = '';
13
+    $view->tag = '';
14
+    $view->base_table = 'node';
15
+    $view->core = 6;
16
+    $view->api_version = '2';
17
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
+    $handler = $view->new_display('default', 'Defaults', 'default');
19
+    $handler->override_option('fields', array(
20 20
     'title' => array(
21
-      'label' => 'Title',
22
-      'alter' => array(
21
+        'label' => 'Title',
22
+        'alter' => array(
23 23
         'alter_text' => 0,
24 24
         'text' => '',
25 25
         'make_link' => 0,
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         'ellipsis' => 1,
39 39
         'html' => 0,
40 40
         'strip_tags' => 0,
41
-      ),
42
-      'empty' => '',
43
-      'hide_empty' => 0,
44
-      'empty_zero' => 0,
45
-      'hide_alter_empty' => 1,
46
-      'link_to_node' => 1,
47
-      'exclude' => 0,
48
-      'id' => 'title',
49
-      'table' => 'node',
50
-      'field' => 'title',
51
-      'relationship' => 'none',
41
+        ),
42
+        'empty' => '',
43
+        'hide_empty' => 0,
44
+        'empty_zero' => 0,
45
+        'hide_alter_empty' => 1,
46
+        'link_to_node' => 1,
47
+        'exclude' => 0,
48
+        'id' => 'title',
49
+        'table' => 'node',
50
+        'field' => 'title',
51
+        'relationship' => 'none',
52 52
     ),
53 53
     'changed' => array(
54
-      'label' => 'Updated date',
55
-      'alter' => array(
54
+        'label' => 'Updated date',
55
+        'alter' => array(
56 56
         'alter_text' => 0,
57 57
         'text' => '',
58 58
         'make_link' => 0,
@@ -71,22 +71,22 @@  discard block
 block discarded – undo
71 71
         'ellipsis' => 1,
72 72
         'html' => 0,
73 73
         'strip_tags' => 0,
74
-      ),
75
-      'empty' => '',
76
-      'hide_empty' => 0,
77
-      'empty_zero' => 0,
78
-      'hide_alter_empty' => 1,
79
-      'date_format' => 'time ago',
80
-      'custom_date_format' => '',
81
-      'exclude' => 0,
82
-      'id' => 'changed',
83
-      'table' => 'node',
84
-      'field' => 'changed',
85
-      'relationship' => 'none',
74
+        ),
75
+        'empty' => '',
76
+        'hide_empty' => 0,
77
+        'empty_zero' => 0,
78
+        'hide_alter_empty' => 1,
79
+        'date_format' => 'time ago',
80
+        'custom_date_format' => '',
81
+        'exclude' => 0,
82
+        'id' => 'changed',
83
+        'table' => 'node',
84
+        'field' => 'changed',
85
+        'relationship' => 'none',
86 86
     ),
87 87
     'uid' => array(
88
-      'label' => 'Uid',
89
-      'alter' => array(
88
+        'label' => 'Uid',
89
+        'alter' => array(
90 90
         'alter_text' => 0,
91 91
         'text' => '',
92 92
         'make_link' => 0,
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
         'ellipsis' => 1,
106 106
         'html' => 0,
107 107
         'strip_tags' => 0,
108
-      ),
109
-      'empty' => '',
110
-      'hide_empty' => 0,
111
-      'empty_zero' => 0,
112
-      'hide_alter_empty' => 1,
113
-      'link_to_user' => 1,
114
-      'exclude' => 1,
115
-      'id' => 'uid',
116
-      'table' => 'users',
117
-      'field' => 'uid',
118
-      'relationship' => 'none',
108
+        ),
109
+        'empty' => '',
110
+        'hide_empty' => 0,
111
+        'empty_zero' => 0,
112
+        'hide_alter_empty' => 1,
113
+        'link_to_user' => 1,
114
+        'exclude' => 1,
115
+        'id' => 'uid',
116
+        'table' => 'users',
117
+        'field' => 'uid',
118
+        'relationship' => 'none',
119 119
     ),
120 120
     'name' => array(
121
-      'label' => 'Author',
122
-      'alter' => array(
121
+        'label' => 'Author',
122
+        'alter' => array(
123 123
         'alter_text' => 0,
124 124
         'text' => '',
125 125
         'make_link' => 1,
@@ -138,81 +138,81 @@  discard block
 block discarded – undo
138 138
         'ellipsis' => 1,
139 139
         'html' => 0,
140 140
         'strip_tags' => 0,
141
-      ),
142
-      'empty' => '',
143
-      'hide_empty' => 0,
144
-      'empty_zero' => 0,
145
-      'hide_alter_empty' => 0,
146
-      'link_to_user' => 0,
147
-      'overwrite_anonymous' => 1,
148
-      'anonymous_text' => 'Anonymous',
149
-      'exclude' => 0,
150
-      'id' => 'name',
151
-      'table' => 'users',
152
-      'field' => 'name',
153
-      'relationship' => 'none',
141
+        ),
142
+        'empty' => '',
143
+        'hide_empty' => 0,
144
+        'empty_zero' => 0,
145
+        'hide_alter_empty' => 0,
146
+        'link_to_user' => 0,
147
+        'overwrite_anonymous' => 1,
148
+        'anonymous_text' => 'Anonymous',
149
+        'exclude' => 0,
150
+        'id' => 'name',
151
+        'table' => 'users',
152
+        'field' => 'name',
153
+        'relationship' => 'none',
154 154
     ),
155
-  ));
156
-  $handler->override_option('filters', array(
155
+    ));
156
+    $handler->override_option('filters', array(
157 157
     'moderate' => array(
158
-      'operator' => '=',
159
-      'value' => '1',
160
-      'group' => '0',
161
-      'exposed' => FALSE,
162
-      'expose' => array(
158
+        'operator' => '=',
159
+        'value' => '1',
160
+        'group' => '0',
161
+        'exposed' => FALSE,
162
+        'expose' => array(
163 163
         'operator' => FALSE,
164 164
         'label' => '',
165
-      ),
166
-      'id' => 'moderate',
167
-      'table' => 'node',
168
-      'field' => 'moderate',
169
-      'relationship' => 'none',
165
+        ),
166
+        'id' => 'moderate',
167
+        'table' => 'node',
168
+        'field' => 'moderate',
169
+        'relationship' => 'none',
170 170
     ),
171
-  ));
172
-  $handler->override_option('access', array(
171
+    ));
172
+    $handler->override_option('access', array(
173 173
     'type' => 'role',
174 174
     'role' => array(
175
-      1271379760 => 1271379760,
175
+        1271379760 => 1271379760,
176 176
     ),
177
-  ));
178
-  $handler->override_option('cache', array(
177
+    ));
178
+    $handler->override_option('cache', array(
179 179
     'type' => 'none',
180
-  ));
181
-  $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page'));
182
-  $handler->override_option('empty_format', '4');
183
-  $handler->override_option('use_pager', '1');
184
-  $handler->override_option('style_plugin', 'table');
185
-  $handler->override_option('style_options', array(
180
+    ));
181
+    $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page'));
182
+    $handler->override_option('empty_format', '4');
183
+    $handler->override_option('use_pager', '1');
184
+    $handler->override_option('style_plugin', 'table');
185
+    $handler->override_option('style_options', array(
186 186
     'grouping' => '',
187 187
     'override' => 1,
188 188
     'sticky' => 0,
189 189
     'order' => 'desc',
190 190
     'summary' => '',
191 191
     'columns' => array(
192
-      'view_node' => 'view_node',
193
-      'title' => 'title',
194
-      'changed' => 'changed',
192
+        'view_node' => 'view_node',
193
+        'title' => 'title',
194
+        'changed' => 'changed',
195 195
     ),
196 196
     'info' => array(
197
-      'view_node' => array(
197
+        'view_node' => array(
198 198
         'separator' => '',
199
-      ),
200
-      'title' => array(
199
+        ),
200
+        'title' => array(
201 201
         'sortable' => 0,
202 202
         'separator' => '',
203
-      ),
204
-      'changed' => array(
203
+        ),
204
+        'changed' => array(
205 205
         'sortable' => 0,
206 206
         'separator' => '',
207
-      ),
207
+        ),
208 208
     ),
209 209
     'default' => 'changed',
210
-  ));
211
-  $handler = $view->new_display('page', 'User profiles', 'page_1');
212
-  $handler->override_option('fields', array(
210
+    ));
211
+    $handler = $view->new_display('page', 'User profiles', 'page_1');
212
+    $handler->override_option('fields', array(
213 213
     'uid' => array(
214
-      'label' => 'Uid',
215
-      'alter' => array(
214
+        'label' => 'Uid',
215
+        'alter' => array(
216 216
         'alter_text' => 0,
217 217
         'text' => '',
218 218
         'make_link' => 0,
@@ -231,24 +231,24 @@  discard block
 block discarded – undo
231 231
         'ellipsis' => 1,
232 232
         'html' => 0,
233 233
         'strip_tags' => 0,
234
-      ),
235
-      'empty' => '',
236
-      'hide_empty' => 0,
237
-      'empty_zero' => 0,
238
-      'hide_alter_empty' => 1,
239
-      'link_to_user' => 1,
240
-      'exclude' => 1,
241
-      'id' => 'uid',
242
-      'table' => 'users',
243
-      'field' => 'uid',
244
-      'override' => array(
234
+        ),
235
+        'empty' => '',
236
+        'hide_empty' => 0,
237
+        'empty_zero' => 0,
238
+        'hide_alter_empty' => 1,
239
+        'link_to_user' => 1,
240
+        'exclude' => 1,
241
+        'id' => 'uid',
242
+        'table' => 'users',
243
+        'field' => 'uid',
244
+        'override' => array(
245 245
         'button' => 'Use default',
246
-      ),
247
-      'relationship' => 'none',
246
+        ),
247
+        'relationship' => 'none',
248 248
     ),
249 249
     'name' => array(
250
-      'label' => 'User',
251
-      'alter' => array(
250
+        'label' => 'User',
251
+        'alter' => array(
252 252
         'alter_text' => 0,
253 253
         'text' => '',
254 254
         'make_link' => 1,
@@ -267,26 +267,26 @@  discard block
 block discarded – undo
267 267
         'ellipsis' => 1,
268 268
         'html' => 0,
269 269
         'strip_tags' => 0,
270
-      ),
271
-      'empty' => '',
272
-      'hide_empty' => 0,
273
-      'empty_zero' => 0,
274
-      'hide_alter_empty' => 1,
275
-      'link_to_user' => 1,
276
-      'overwrite_anonymous' => 0,
277
-      'anonymous_text' => '',
278
-      'exclude' => 0,
279
-      'id' => 'name',
280
-      'table' => 'users',
281
-      'field' => 'name',
282
-      'override' => array(
270
+        ),
271
+        'empty' => '',
272
+        'hide_empty' => 0,
273
+        'empty_zero' => 0,
274
+        'hide_alter_empty' => 1,
275
+        'link_to_user' => 1,
276
+        'overwrite_anonymous' => 0,
277
+        'anonymous_text' => '',
278
+        'exclude' => 0,
279
+        'id' => 'name',
280
+        'table' => 'users',
281
+        'field' => 'name',
282
+        'override' => array(
283 283
         'button' => 'Use default',
284
-      ),
285
-      'relationship' => 'none',
284
+        ),
285
+        'relationship' => 'none',
286 286
     ),
287 287
     'changed' => array(
288
-      'label' => 'Updated date',
289
-      'alter' => array(
288
+        'label' => 'Updated date',
289
+        'alter' => array(
290 290
         'alter_text' => 0,
291 291
         'text' => '',
292 292
         'make_link' => 0,
@@ -305,22 +305,22 @@  discard block
 block discarded – undo
305 305
         'ellipsis' => 1,
306 306
         'html' => 0,
307 307
         'strip_tags' => 0,
308
-      ),
309
-      'empty' => '',
310
-      'hide_empty' => 0,
311
-      'empty_zero' => 0,
312
-      'hide_alter_empty' => 1,
313
-      'date_format' => 'time ago',
314
-      'custom_date_format' => '',
315
-      'exclude' => 0,
316
-      'id' => 'changed',
317
-      'table' => 'node',
318
-      'field' => 'changed',
319
-      'relationship' => 'none',
308
+        ),
309
+        'empty' => '',
310
+        'hide_empty' => 0,
311
+        'empty_zero' => 0,
312
+        'hide_alter_empty' => 1,
313
+        'date_format' => 'time ago',
314
+        'custom_date_format' => '',
315
+        'exclude' => 0,
316
+        'id' => 'changed',
317
+        'table' => 'node',
318
+        'field' => 'changed',
319
+        'relationship' => 'none',
320 320
     ),
321 321
     'phpcode' => array(
322
-      'label' => 'Edit Profile',
323
-      'alter' => array(
322
+        'label' => 'Edit Profile',
323
+        'alter' => array(
324 324
         'alter_text' => 0,
325 325
         'text' => '',
326 326
         'make_link' => 0,
@@ -339,108 +339,108 @@  discard block
 block discarded – undo
339 339
         'ellipsis' => 1,
340 340
         'html' => 0,
341 341
         'strip_tags' => 0,
342
-      ),
343
-      'empty' => '',
344
-      'hide_empty' => 0,
345
-      'empty_zero' => 0,
346
-      'hide_alter_empty' => 1,
347
-      'value' => '<?php
342
+        ),
343
+        'empty' => '',
344
+        'hide_empty' => 0,
345
+        'empty_zero' => 0,
346
+        'hide_alter_empty' => 1,
347
+        'value' => '<?php
348 348
 $uid = $data->users_uid;
349 349
 return l(
350 350
 bts(\'edit\', array(), NULL, \'boinc:edit-profile\'),
351 351
 "/moderate/profile/$uid/edit");
352 352
 ?>',
353
-      'exclude' => 0,
354
-      'id' => 'phpcode',
355
-      'table' => 'customfield',
356
-      'field' => 'phpcode',
357
-      'override' => array(
353
+        'exclude' => 0,
354
+        'id' => 'phpcode',
355
+        'table' => 'customfield',
356
+        'field' => 'phpcode',
357
+        'override' => array(
358 358
         'button' => 'Use default',
359
-      ),
360
-      'relationship' => 'none',
359
+        ),
360
+        'relationship' => 'none',
361 361
     ),
362
-  ));
363
-  $handler->override_option('filters', array(
362
+    ));
363
+    $handler->override_option('filters', array(
364 364
     'moderate' => array(
365
-      'operator' => '=',
366
-      'value' => '1',
367
-      'group' => '0',
368
-      'exposed' => FALSE,
369
-      'expose' => array(
365
+        'operator' => '=',
366
+        'value' => '1',
367
+        'group' => '0',
368
+        'exposed' => FALSE,
369
+        'expose' => array(
370 370
         'operator' => FALSE,
371 371
         'label' => '',
372
-      ),
373
-      'id' => 'moderate',
374
-      'table' => 'node',
375
-      'field' => 'moderate',
376
-      'override' => array(
372
+        ),
373
+        'id' => 'moderate',
374
+        'table' => 'node',
375
+        'field' => 'moderate',
376
+        'override' => array(
377 377
         'button' => 'Use default',
378
-      ),
379
-      'relationship' => 'none',
378
+        ),
379
+        'relationship' => 'none',
380 380
     ),
381 381
     'type' => array(
382
-      'operator' => 'in',
383
-      'value' => array(
382
+        'operator' => 'in',
383
+        'value' => array(
384 384
         'profile' => 'profile',
385
-      ),
386
-      'group' => '0',
387
-      'exposed' => FALSE,
388
-      'expose' => array(
385
+        ),
386
+        'group' => '0',
387
+        'exposed' => FALSE,
388
+        'expose' => array(
389 389
         'operator' => FALSE,
390 390
         'label' => '',
391
-      ),
392
-      'id' => 'type',
393
-      'table' => 'node',
394
-      'field' => 'type',
395
-      'override' => array(
391
+        ),
392
+        'id' => 'type',
393
+        'table' => 'node',
394
+        'field' => 'type',
395
+        'override' => array(
396 396
         'button' => 'Use default',
397
-      ),
398
-      'relationship' => 'none',
397
+        ),
398
+        'relationship' => 'none',
399 399
     ),
400
-  ));
401
-  $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page'));
402
-  $handler->override_option('path', 'moderate/profiles');
403
-  $handler->override_option('menu', array(
400
+    ));
401
+    $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page'));
402
+    $handler->override_option('path', 'moderate/profiles');
403
+    $handler->override_option('menu', array(
404 404
     'type' => 'default tab',
405 405
     'title' => 'Queue',
406 406
     'description' => '',
407 407
     'weight' => '-50',
408 408
     'name' => 'primary-links',
409
-  ));
410
-  $handler->override_option('tab_options', array(
409
+    ));
410
+    $handler->override_option('tab_options', array(
411 411
     'type' => 'normal',
412 412
     'title' => 'Moderation',
413 413
     'description' => '',
414 414
     'weight' => '0',
415 415
     'name' => 'primary-links',
416
-  ));
416
+    ));
417 417
 
418
-  $views[$view->name] = $view;
418
+    $views[$view->name] = $view;
419 419
 
420
-  // Exported view: user_activity
421
-  $view = new view;
422
-  $view->name = 'user_activity';
423
-  $view->description = 'A feed of a user\'s activity on the site';
424
-  $view->tag = '';
425
-  $view->base_table = 'node_revisions';
426
-  $view->core = 6;
427
-  $view->api_version = '2';
428
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
429
-  $handler = $view->new_display('default', 'Defaults', 'default');
430
-  $handler->override_option('relationships', array(
420
+    // Exported view: user_activity
421
+    $view = new view;
422
+    $view->name = 'user_activity';
423
+    $view->description = 'A feed of a user\'s activity on the site';
424
+    $view->tag = '';
425
+    $view->base_table = 'node_revisions';
426
+    $view->core = 6;
427
+    $view->api_version = '2';
428
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
429
+    $handler = $view->new_display('default', 'Defaults', 'default');
430
+    $handler->override_option('relationships', array(
431 431
     'uid' => array(
432
-      'label' => 'user',
433
-      'required' => 1,
434
-      'id' => 'uid',
435
-      'table' => 'node_revisions',
436
-      'field' => 'uid',
437
-      'relationship' => 'none',
432
+        'label' => 'user',
433
+        'required' => 1,
434
+        'id' => 'uid',
435
+        'table' => 'node_revisions',
436
+        'field' => 'uid',
437
+        'relationship' => 'none',
438 438
     ),
439
-  ));
440
-  $handler->override_option('fields', array(
439
+    ));
440
+    $handler->override_option('fields', array(
441 441
     'nid' => array(
442
-      'label' => 'Nid',
443
-      'alter' => array(
442
+        'label' => 'Nid',
443
+        'alter' => array(
444 444
         'alter_text' => 0,
445 445
         'text' => '',
446 446
         'make_link' => 0,
@@ -459,21 +459,21 @@  discard block
 block discarded – undo
459 459
         'ellipsis' => 1,
460 460
         'html' => 0,
461 461
         'strip_tags' => 0,
462
-      ),
463
-      'empty' => '',
464
-      'hide_empty' => 0,
465
-      'empty_zero' => 0,
466
-      'hide_alter_empty' => 1,
467
-      'link_to_node' => 0,
468
-      'exclude' => 1,
469
-      'id' => 'nid',
470
-      'table' => 'node',
471
-      'field' => 'nid',
472
-      'relationship' => 'none',
462
+        ),
463
+        'empty' => '',
464
+        'hide_empty' => 0,
465
+        'empty_zero' => 0,
466
+        'hide_alter_empty' => 1,
467
+        'link_to_node' => 0,
468
+        'exclude' => 1,
469
+        'id' => 'nid',
470
+        'table' => 'node',
471
+        'field' => 'nid',
472
+        'relationship' => 'none',
473 473
     ),
474 474
     'title' => array(
475
-      'label' => 'Title',
476
-      'alter' => array(
475
+        'label' => 'Title',
476
+        'alter' => array(
477 477
         'alter_text' => 0,
478 478
         'text' => '',
479 479
         'make_link' => 0,
@@ -492,21 +492,21 @@  discard block
 block discarded – undo
492 492
         'ellipsis' => 1,
493 493
         'html' => 0,
494 494
         'strip_tags' => 0,
495
-      ),
496
-      'empty' => '',
497
-      'hide_empty' => 0,
498
-      'empty_zero' => 0,
499
-      'hide_alter_empty' => 1,
500
-      'link_to_node' => 0,
501
-      'exclude' => 1,
502
-      'id' => 'title',
503
-      'table' => 'node',
504
-      'field' => 'title',
505
-      'relationship' => 'none',
495
+        ),
496
+        'empty' => '',
497
+        'hide_empty' => 0,
498
+        'empty_zero' => 0,
499
+        'hide_alter_empty' => 1,
500
+        'link_to_node' => 0,
501
+        'exclude' => 1,
502
+        'id' => 'title',
503
+        'table' => 'node',
504
+        'field' => 'title',
505
+        'relationship' => 'none',
506 506
     ),
507 507
     'type' => array(
508
-      'label' => 'Type',
509
-      'alter' => array(
508
+        'label' => 'Type',
509
+        'alter' => array(
510 510
         'alter_text' => 0,
511 511
         'text' => '',
512 512
         'make_link' => 0,
@@ -525,22 +525,22 @@  discard block
 block discarded – undo
525 525
         'ellipsis' => 1,
526 526
         'html' => 0,
527 527
         'strip_tags' => 0,
528
-      ),
529
-      'empty' => '',
530
-      'hide_empty' => 0,
531
-      'empty_zero' => 0,
532
-      'hide_alter_empty' => 1,
533
-      'link_to_node' => 0,
534
-      'machine_name' => 0,
535
-      'exclude' => 1,
536
-      'id' => 'type',
537
-      'table' => 'node',
538
-      'field' => 'type',
539
-      'relationship' => 'none',
528
+        ),
529
+        'empty' => '',
530
+        'hide_empty' => 0,
531
+        'empty_zero' => 0,
532
+        'hide_alter_empty' => 1,
533
+        'link_to_node' => 0,
534
+        'machine_name' => 0,
535
+        'exclude' => 1,
536
+        'id' => 'type',
537
+        'table' => 'node',
538
+        'field' => 'type',
539
+        'relationship' => 'none',
540 540
     ),
541 541
     'uid' => array(
542
-      'label' => 'Uid',
543
-      'alter' => array(
542
+        'label' => 'Uid',
543
+        'alter' => array(
544 544
         'alter_text' => 0,
545 545
         'text' => '',
546 546
         'make_link' => 0,
@@ -559,21 +559,21 @@  discard block
 block discarded – undo
559 559
         'ellipsis' => 1,
560 560
         'html' => 0,
561 561
         'strip_tags' => 0,
562
-      ),
563
-      'empty' => '',
564
-      'hide_empty' => 0,
565
-      'empty_zero' => 0,
566
-      'hide_alter_empty' => 1,
567
-      'link_to_user' => 0,
568
-      'exclude' => 1,
569
-      'id' => 'uid',
570
-      'table' => 'users',
571
-      'field' => 'uid',
572
-      'relationship' => 'uid',
562
+        ),
563
+        'empty' => '',
564
+        'hide_empty' => 0,
565
+        'empty_zero' => 0,
566
+        'hide_alter_empty' => 1,
567
+        'link_to_user' => 0,
568
+        'exclude' => 1,
569
+        'id' => 'uid',
570
+        'table' => 'users',
571
+        'field' => 'uid',
572
+        'relationship' => 'uid',
573 573
     ),
574 574
     'nothing' => array(
575
-      'label' => '',
576
-      'alter' => array(
575
+        'label' => '',
576
+        'alter' => array(
577 577
         'text' => '<div class="gray-divider"></div>',
578 578
         'make_link' => 0,
579 579
         'path' => '',
@@ -591,20 +591,20 @@  discard block
 block discarded – undo
591 591
         'ellipsis' => 1,
592 592
         'html' => 0,
593 593
         'strip_tags' => 0,
594
-      ),
595
-      'empty' => '',
596
-      'hide_empty' => 0,
597
-      'empty_zero' => 0,
598
-      'hide_alter_empty' => 1,
599
-      'exclude' => 0,
600
-      'id' => 'nothing',
601
-      'table' => 'views',
602
-      'field' => 'nothing',
603
-      'relationship' => 'none',
594
+        ),
595
+        'empty' => '',
596
+        'hide_empty' => 0,
597
+        'empty_zero' => 0,
598
+        'hide_alter_empty' => 1,
599
+        'exclude' => 0,
600
+        'id' => 'nothing',
601
+        'table' => 'views',
602
+        'field' => 'nothing',
603
+        'relationship' => 'none',
604 604
     ),
605 605
     'phpcode_1' => array(
606
-      'label' => '',
607
-      'alter' => array(
606
+        'label' => '',
607
+        'alter' => array(
608 608
         'alter_text' => 0,
609 609
         'text' => '',
610 610
         'make_link' => 0,
@@ -623,12 +623,12 @@  discard block
 block discarded – undo
623 623
         'ellipsis' => 1,
624 624
         'html' => 0,
625 625
         'strip_tags' => 0,
626
-      ),
627
-      'empty' => '',
628
-      'hide_empty' => 0,
629
-      'empty_zero' => 0,
630
-      'hide_alter_empty' => 1,
631
-      'value' => '<?php
626
+        ),
627
+        'empty' => '',
628
+        'hide_empty' => 0,
629
+        'empty_zero' => 0,
630
+        'hide_alter_empty' => 1,
631
+        'value' => '<?php
632 632
 
633 633
 switch($data->node_type) {
634 634
 case \'forum\':
@@ -657,18 +657,18 @@  discard block
 block discarded – undo
657 657
 $account = user_load($uid);
658 658
 echo l($account->boincuser_name, "account/{$uid}") . " {$action} " . l($data->node_title, $url, array(\'fragment\' => $fragment));
659 659
 ?>',
660
-      'exclude' => 0,
661
-      'id' => 'phpcode_1',
662
-      'table' => 'customfield',
663
-      'field' => 'phpcode',
664
-      'relationship' => 'none',
665
-      'override' => array(
660
+        'exclude' => 0,
661
+        'id' => 'phpcode_1',
662
+        'table' => 'customfield',
663
+        'field' => 'phpcode',
664
+        'relationship' => 'none',
665
+        'override' => array(
666 666
         'button' => 'Override',
667
-      ),
667
+        ),
668 668
     ),
669 669
     'body' => array(
670
-      'label' => '',
671
-      'alter' => array(
670
+        'label' => '',
671
+        'alter' => array(
672 672
         'alter_text' => 0,
673 673
         'text' => '',
674 674
         'make_link' => 0,
@@ -687,20 +687,20 @@  discard block
 block discarded – undo
687 687
         'ellipsis' => 1,
688 688
         'html' => 0,
689 689
         'strip_tags' => 1,
690
-      ),
691
-      'empty' => '',
692
-      'hide_empty' => 0,
693
-      'empty_zero' => 0,
694
-      'hide_alter_empty' => 1,
695
-      'exclude' => 0,
696
-      'id' => 'body',
697
-      'table' => 'node_revisions',
698
-      'field' => 'body',
699
-      'relationship' => 'none',
690
+        ),
691
+        'empty' => '',
692
+        'hide_empty' => 0,
693
+        'empty_zero' => 0,
694
+        'hide_alter_empty' => 1,
695
+        'exclude' => 0,
696
+        'id' => 'body',
697
+        'table' => 'node_revisions',
698
+        'field' => 'body',
699
+        'relationship' => 'none',
700 700
     ),
701 701
     'timestamp' => array(
702
-      'label' => '',
703
-      'alter' => array(
702
+        'label' => '',
703
+        'alter' => array(
704 704
         'alter_text' => 0,
705 705
         'text' => '',
706 706
         'make_link' => 0,
@@ -719,40 +719,40 @@  discard block
 block discarded – undo
719 719
         'ellipsis' => 1,
720 720
         'html' => 0,
721 721
         'strip_tags' => 0,
722
-      ),
723
-      'empty' => '',
724
-      'hide_empty' => 0,
725
-      'empty_zero' => 0,
726
-      'hide_alter_empty' => 1,
727
-      'date_format' => 'custom',
728
-      'custom_date_format' => 'jS F Y',
729
-      'exclude' => 0,
730
-      'id' => 'timestamp',
731
-      'table' => 'node_revisions',
732
-      'field' => 'timestamp',
733
-      'relationship' => 'none',
722
+        ),
723
+        'empty' => '',
724
+        'hide_empty' => 0,
725
+        'empty_zero' => 0,
726
+        'hide_alter_empty' => 1,
727
+        'date_format' => 'custom',
728
+        'custom_date_format' => 'jS F Y',
729
+        'exclude' => 0,
730
+        'id' => 'timestamp',
731
+        'table' => 'node_revisions',
732
+        'field' => 'timestamp',
733
+        'relationship' => 'none',
734 734
     ),
735
-  ));
736
-  $handler->override_option('arguments', array(
735
+    ));
736
+    $handler->override_option('arguments', array(
737 737
     'uid' => array(
738
-      'default_action' => 'default',
739
-      'style_plugin' => 'default_summary',
740
-      'style_options' => array(),
741
-      'wildcard' => 'all',
742
-      'wildcard_substitution' => 'All',
743
-      'title' => '',
744
-      'breadcrumb' => '',
745
-      'default_argument_type' => 'user',
746
-      'default_argument' => '',
747
-      'validate_type' => 'user',
748
-      'validate_fail' => 'empty',
749
-      'break_phrase' => 0,
750
-      'not' => 0,
751
-      'id' => 'uid',
752
-      'table' => 'users',
753
-      'field' => 'uid',
754
-      'validate_user_argument_type' => 'uid',
755
-      'validate_user_roles' => array(
738
+        'default_action' => 'default',
739
+        'style_plugin' => 'default_summary',
740
+        'style_options' => array(),
741
+        'wildcard' => 'all',
742
+        'wildcard_substitution' => 'All',
743
+        'title' => '',
744
+        'breadcrumb' => '',
745
+        'default_argument_type' => 'user',
746
+        'default_argument' => '',
747
+        'validate_type' => 'user',
748
+        'validate_fail' => 'empty',
749
+        'break_phrase' => 0,
750
+        'not' => 0,
751
+        'id' => 'uid',
752
+        'table' => 'users',
753
+        'field' => 'uid',
754
+        'validate_user_argument_type' => 'uid',
755
+        'validate_user_roles' => array(
756 756
         2 => 0,
757 757
         3519698132 => 0,
758 758
         1110965548 => 0,
@@ -761,20 +761,20 @@  discard block
 block discarded – undo
761 761
         268174006 => 0,
762 762
         1271379760 => 0,
763 763
         933038561 => 0,
764
-      ),
765
-      'relationship' => 'uid',
766
-      'default_options_div_prefix' => '',
767
-      'default_taxonomy_tid_term_page' => 0,
768
-      'default_taxonomy_tid_node' => 0,
769
-      'default_taxonomy_tid_limit' => 0,
770
-      'default_taxonomy_tid_vids' => array(
764
+        ),
765
+        'relationship' => 'uid',
766
+        'default_options_div_prefix' => '',
767
+        'default_taxonomy_tid_term_page' => 0,
768
+        'default_taxonomy_tid_node' => 0,
769
+        'default_taxonomy_tid_limit' => 0,
770
+        'default_taxonomy_tid_vids' => array(
771 771
         1 => 0,
772 772
         2 => 0,
773
-      ),
774
-      'default_argument_user' => 0,
775
-      'default_argument_fixed' => '',
776
-      'default_argument_php' => '',
777
-      'validate_argument_node_type' => array(
773
+        ),
774
+        'default_argument_user' => 0,
775
+        'default_argument_fixed' => '',
776
+        'default_argument_php' => '',
777
+        'validate_argument_node_type' => array(
778 778
         'page' => 0,
779 779
         'news' => 0,
780 780
         'team' => 0,
@@ -783,20 +783,20 @@  discard block
 block discarded – undo
783 783
         'forum' => 0,
784 784
         'panel' => 0,
785 785
         'story' => 0,
786
-      ),
787
-      'validate_argument_node_access' => 0,
788
-      'validate_argument_nid_type' => 'nid',
789
-      'validate_argument_vocabulary' => array(
786
+        ),
787
+        'validate_argument_node_access' => 0,
788
+        'validate_argument_nid_type' => 'nid',
789
+        'validate_argument_vocabulary' => array(
790 790
         1 => 0,
791 791
         2 => 0,
792
-      ),
793
-      'validate_argument_type' => 'tid',
794
-      'validate_argument_transform' => 0,
795
-      'validate_user_restrict_roles' => 0,
796
-      'validate_argument_php' => '',
797
-      'me_redirect' => 0,
798
-      'me_validate_user_argument_type' => 'uid',
799
-      'me_validate_user_roles' => array(
792
+        ),
793
+        'validate_argument_type' => 'tid',
794
+        'validate_argument_transform' => 0,
795
+        'validate_user_restrict_roles' => 0,
796
+        'validate_argument_php' => '',
797
+        'me_redirect' => 0,
798
+        'me_validate_user_argument_type' => 'uid',
799
+        'me_validate_user_roles' => array(
800 800
         2 => 0,
801 801
         3519698132 => 0,
802 802
         1110965548 => 0,
@@ -805,67 +805,67 @@  discard block
 block discarded – undo
805 805
         268174006 => 0,
806 806
         1271379760 => 0,
807 807
         933038561 => 0,
808
-      ),
809
-      'validate_argument_node_flag_name' => '*relationship*',
810
-      'validate_argument_node_flag_test' => 'flaggable',
811
-      'validate_argument_node_flag_id_type' => 'id',
812
-      'validate_argument_user_flag_name' => '*relationship*',
813
-      'validate_argument_user_flag_test' => 'flaggable',
814
-      'validate_argument_user_flag_id_type' => 'id',
815
-      'me_validate_user_restrict_roles' => 0,
808
+        ),
809
+        'validate_argument_node_flag_name' => '*relationship*',
810
+        'validate_argument_node_flag_test' => 'flaggable',
811
+        'validate_argument_node_flag_id_type' => 'id',
812
+        'validate_argument_user_flag_name' => '*relationship*',
813
+        'validate_argument_user_flag_test' => 'flaggable',
814
+        'validate_argument_user_flag_id_type' => 'id',
815
+        'me_validate_user_restrict_roles' => 0,
816 816
     ),
817
-  ));
818
-  $handler->override_option('access', array(
817
+    ));
818
+    $handler->override_option('access', array(
819 819
     'type' => 'none',
820
-  ));
821
-  $handler->override_option('cache', array(
820
+    ));
821
+    $handler->override_option('cache', array(
822 822
     'type' => 'none',
823
-  ));
824
-  $handler->override_option('items_per_page', 5);
825
-  $handler->override_option('use_pager', '1');
826
-  $handler->override_option('row_options', array(
823
+    ));
824
+    $handler->override_option('items_per_page', 5);
825
+    $handler->override_option('use_pager', '1');
826
+    $handler->override_option('row_options', array(
827 827
     'inline' => array(
828
-      'value' => 'value',
829
-      'phpcode_1' => 'phpcode_1',
828
+        'value' => 'value',
829
+        'phpcode_1' => 'phpcode_1',
830 830
     ),
831 831
     'separator' => ' ',
832 832
     'hide_empty' => 0,
833
-  ));
834
-  $handler = $view->new_display('block', 'Block', 'block_1');
835
-  $handler->override_option('block_description', '');
836
-  $handler->override_option('block_caching', -1);
837
-  $handler = $view->new_display('page', 'Page', 'page_1');
838
-  $handler->override_option('title', 'Recent posts');
839
-  $handler->override_option('style_plugin', 'grid');
840
-  $handler->override_option('style_options', array(
833
+    ));
834
+    $handler = $view->new_display('block', 'Block', 'block_1');
835
+    $handler->override_option('block_description', '');
836
+    $handler->override_option('block_caching', -1);
837
+    $handler = $view->new_display('page', 'Page', 'page_1');
838
+    $handler->override_option('title', 'Recent posts');
839
+    $handler->override_option('style_plugin', 'grid');
840
+    $handler->override_option('style_options', array(
841 841
     'grouping' => '',
842 842
     'columns' => '1',
843 843
     'alignment' => 'vertical',
844 844
     'fill_single_line' => 1,
845 845
     'summary' => '',
846
-  ));
847
-  $handler->override_option('row_options', array(
846
+    ));
847
+    $handler->override_option('row_options', array(
848 848
     'inline' => array(),
849 849
     'separator' => '',
850 850
     'hide_empty' => 0,
851
-  ));
852
-  $handler->override_option('path', 'account/%/posts');
853
-  $handler->override_option('menu', array(
851
+    ));
852
+    $handler->override_option('path', 'account/%/posts');
853
+    $handler->override_option('menu', array(
854 854
     'type' => 'none',
855 855
     'title' => '',
856 856
     'description' => '',
857 857
     'weight' => '0',
858 858
     'name' => 'primary-links',
859
-  ));
860
-  $handler->override_option('tab_options', array(
859
+    ));
860
+    $handler->override_option('tab_options', array(
861 861
     'type' => 'none',
862 862
     'title' => '',
863 863
     'description' => '',
864 864
     'weight' => 0,
865 865
     'name' => 'navigation',
866
-  ));
866
+    ));
867 867
 
868
-  $views[$view->name] = $view;
868
+    $views[$view->name] = $view;
869 869
 
870
-  return $views;
870
+    return $views;
871 871
 }
Please login to merge, or discard this patch.
sites/default/boinc/modules/comment_form_block/comment_form_block.module 3 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,40 +9,40 @@  discard block
 block discarded – undo
9 9
  * Implements hook_block() for Drupal 6 compatibility
10 10
  */
11 11
 function comment_form_block_block($op = 'list', $delta = 0, $edit = array()) {
12
-  switch ($op) {
13
-  case 'view':
12
+    switch ($op) {
13
+    case 'view':
14 14
     //$block = node_comment_block_block_view($delta);
15 15
     $block = array();
16 16
     if ($delta == 'comment_form') {
17
-      if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
17
+        if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
18 18
         global $user;
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
23
-          $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
21
+            $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
+            $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
23
+            $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
24
+        }
24 25
         }
25
-      }
26 26
     }
27 27
     break;
28
-  case 'list':
28
+    case 'list':
29 29
     $blocks = comment_form_block_block_info();
30 30
     return $blocks;
31 31
     break;
32
-  default:
32
+    default:
33 33
   }
34
-  return $block;
34
+    return $block;
35 35
 }
36 36
 
37 37
 /**
38 38
  * Implements hook_block_info().
39 39
  */
40 40
 function comment_form_block_block_info() {
41
-  $blocks['comment_form'] = array(
41
+    $blocks['comment_form'] = array(
42 42
     'info' => bts('Comment form', array(), NULL, 'boinc:forum-comment-form'),
43
-  );
43
+    );
44 44
 
45
-  return $blocks;
45
+    return $blocks;
46 46
 }
47 47
 
48 48
 /**
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
  * Implements hook_form_FORM_ID_alter() for block_admin_configure.
82 82
  */
83 83
 function comment_form_block_form_block_admin_configure_alter(&$form, &$form_state) {
84
-  if (isset($form['delta'])) {
84
+    if (isset($form['delta'])) {
85 85
     if ($form['delta']['#value'] == 'comment_form') {
86
-      $form['settings']['title']['#disabled'] = TRUE;
87
-      $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
86
+        $form['settings']['title']['#disabled'] = TRUE;
87
+        $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
88
+    }
88 89
     }
89
-  }
90 90
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21 21
           $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
22
+          $block['content'] = '<h2>'.bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment').'</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
24 24
         }
25 25
       }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
       if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
18 18
         global $user;
19 19
         $node = node_load($nid);
20
-        if ($node->comment !== 0 AND user_access('post comments', $user)) {
21
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
20
+        if ($node->comment !== 0 and user_access('post comments', $user)) {
21
+          $block['subject'] = null; // This should be NULL otherwise there will be duplicate h2 elements.
22
+          $block['content'] = '<h2>' . bts('Post new comment', array(), null, 'boinc:forum-post-new-comment') . '</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
24 24
         }
25 25
       }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  */
40 40
 function comment_form_block_block_info() {
41 41
   $blocks['comment_form'] = array(
42
-    'info' => bts('Comment form', array(), NULL, 'boinc:forum-comment-form'),
42
+    'info' => bts('Comment form', array(), null, 'boinc:forum-comment-form'),
43 43
   );
44 44
 
45 45
   return $blocks;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 function comment_form_block_form_block_admin_configure_alter(&$form, &$form_state) {
84 84
   if (isset($form['delta'])) {
85 85
     if ($form['delta']['#value'] == 'comment_form') {
86
-      $form['settings']['title']['#disabled'] = TRUE;
86
+      $form['settings']['title']['#disabled'] = true;
87 87
       $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
88 88
     }
89 89
   }
Please login to merge, or discard this patch.