@@ -4,22 +4,22 @@ discard block |
||
| 4 | 4 | * Implementation of hook_views_default_views(). |
| 5 | 5 | */ |
| 6 | 6 | function stats_charts_views_default_views() { |
| 7 | - $views = array(); |
|
| 7 | + $views = array(); |
|
| 8 | 8 | |
| 9 | - // Exported view: boinc_account_stats |
|
| 10 | - $view = new view; |
|
| 11 | - $view->name = 'boinc_account_stats'; |
|
| 12 | - $view->description = 'BOINC user stats information'; |
|
| 13 | - $view->tag = ''; |
|
| 14 | - $view->base_table = 'user'; |
|
| 15 | - $view->core = 0; |
|
| 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: boinc_account_stats |
|
| 10 | + $view = new view; |
|
| 11 | + $view->name = 'boinc_account_stats'; |
|
| 12 | + $view->description = 'BOINC user stats information'; |
|
| 13 | + $view->tag = ''; |
|
| 14 | + $view->base_table = 'user'; |
|
| 15 | + $view->core = 0; |
|
| 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 | 'id' => array( |
| 21 | - 'label' => 'User ID', |
|
| 22 | - 'alter' => array( |
|
| 21 | + 'label' => 'User ID', |
|
| 22 | + 'alter' => array( |
|
| 23 | 23 | 'alter_text' => 0, |
| 24 | 24 | 'text' => '', |
| 25 | 25 | 'make_link' => 0, |
@@ -36,25 +36,25 @@ discard block |
||
| 36 | 36 | 'ellipsis' => 1, |
| 37 | 37 | 'html' => 0, |
| 38 | 38 | 'strip_tags' => 0, |
| 39 | - ), |
|
| 40 | - 'empty' => '', |
|
| 41 | - 'hide_empty' => 0, |
|
| 42 | - 'empty_zero' => 0, |
|
| 43 | - 'set_precision' => FALSE, |
|
| 44 | - 'precision' => 0, |
|
| 45 | - 'decimal' => '.', |
|
| 46 | - 'separator' => '', |
|
| 47 | - 'prefix' => '', |
|
| 48 | - 'suffix' => '', |
|
| 49 | - 'exclude' => 0, |
|
| 50 | - 'id' => 'id', |
|
| 51 | - 'table' => 'user', |
|
| 52 | - 'field' => 'id', |
|
| 53 | - 'relationship' => 'none', |
|
| 39 | + ), |
|
| 40 | + 'empty' => '', |
|
| 41 | + 'hide_empty' => 0, |
|
| 42 | + 'empty_zero' => 0, |
|
| 43 | + 'set_precision' => FALSE, |
|
| 44 | + 'precision' => 0, |
|
| 45 | + 'decimal' => '.', |
|
| 46 | + 'separator' => '', |
|
| 47 | + 'prefix' => '', |
|
| 48 | + 'suffix' => '', |
|
| 49 | + 'exclude' => 0, |
|
| 50 | + 'id' => 'id', |
|
| 51 | + 'table' => 'user', |
|
| 52 | + 'field' => 'id', |
|
| 53 | + 'relationship' => 'none', |
|
| 54 | 54 | ), |
| 55 | 55 | 'total_credit' => array( |
| 56 | - 'label' => 'Total credit', |
|
| 57 | - 'alter' => array( |
|
| 56 | + 'label' => 'Total credit', |
|
| 57 | + 'alter' => array( |
|
| 58 | 58 | 'alter_text' => 0, |
| 59 | 59 | 'text' => '', |
| 60 | 60 | 'make_link' => 0, |
@@ -71,25 +71,25 @@ discard block |
||
| 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 | - 'set_precision' => 1, |
|
| 79 | - 'precision' => '0', |
|
| 80 | - 'decimal' => '.', |
|
| 81 | - 'separator' => ',', |
|
| 82 | - 'prefix' => '', |
|
| 83 | - 'suffix' => '', |
|
| 84 | - 'exclude' => 0, |
|
| 85 | - 'id' => 'total_credit', |
|
| 86 | - 'table' => 'user', |
|
| 87 | - 'field' => 'total_credit', |
|
| 88 | - 'relationship' => 'none', |
|
| 74 | + ), |
|
| 75 | + 'empty' => '', |
|
| 76 | + 'hide_empty' => 0, |
|
| 77 | + 'empty_zero' => 0, |
|
| 78 | + 'set_precision' => 1, |
|
| 79 | + 'precision' => '0', |
|
| 80 | + 'decimal' => '.', |
|
| 81 | + 'separator' => ',', |
|
| 82 | + 'prefix' => '', |
|
| 83 | + 'suffix' => '', |
|
| 84 | + 'exclude' => 0, |
|
| 85 | + 'id' => 'total_credit', |
|
| 86 | + 'table' => 'user', |
|
| 87 | + 'field' => 'total_credit', |
|
| 88 | + 'relationship' => 'none', |
|
| 89 | 89 | ), |
| 90 | 90 | 'expavg_credit' => array( |
| 91 | - 'label' => 'Recent average credit', |
|
| 92 | - 'alter' => array( |
|
| 91 | + 'label' => 'Recent average credit', |
|
| 92 | + 'alter' => array( |
|
| 93 | 93 | 'alter_text' => 0, |
| 94 | 94 | 'text' => '', |
| 95 | 95 | 'make_link' => 0, |
@@ -106,25 +106,25 @@ discard block |
||
| 106 | 106 | 'ellipsis' => 1, |
| 107 | 107 | 'html' => 0, |
| 108 | 108 | 'strip_tags' => 0, |
| 109 | - ), |
|
| 110 | - 'empty' => '', |
|
| 111 | - 'hide_empty' => 0, |
|
| 112 | - 'empty_zero' => 0, |
|
| 113 | - 'set_precision' => 1, |
|
| 114 | - 'precision' => '2', |
|
| 115 | - 'decimal' => '.', |
|
| 116 | - 'separator' => ',', |
|
| 117 | - 'prefix' => '', |
|
| 118 | - 'suffix' => '', |
|
| 119 | - 'exclude' => 0, |
|
| 120 | - 'id' => 'expavg_credit', |
|
| 121 | - 'table' => 'user', |
|
| 122 | - 'field' => 'expavg_credit', |
|
| 123 | - 'relationship' => 'none', |
|
| 109 | + ), |
|
| 110 | + 'empty' => '', |
|
| 111 | + 'hide_empty' => 0, |
|
| 112 | + 'empty_zero' => 0, |
|
| 113 | + 'set_precision' => 1, |
|
| 114 | + 'precision' => '2', |
|
| 115 | + 'decimal' => '.', |
|
| 116 | + 'separator' => ',', |
|
| 117 | + 'prefix' => '', |
|
| 118 | + 'suffix' => '', |
|
| 119 | + 'exclude' => 0, |
|
| 120 | + 'id' => 'expavg_credit', |
|
| 121 | + 'table' => 'user', |
|
| 122 | + 'field' => 'expavg_credit', |
|
| 123 | + 'relationship' => 'none', |
|
| 124 | 124 | ), |
| 125 | 125 | 'nothing_4' => array( |
| 126 | - 'label' => 'Pending credit', |
|
| 127 | - 'alter' => array( |
|
| 126 | + 'label' => 'Pending credit', |
|
| 127 | + 'alter' => array( |
|
| 128 | 128 | 'text' => 'View', |
| 129 | 129 | 'make_link' => 1, |
| 130 | 130 | 'path' => 'account/credit/pending', |
@@ -142,20 +142,20 @@ discard block |
||
| 142 | 142 | 'ellipsis' => 1, |
| 143 | 143 | 'html' => 0, |
| 144 | 144 | 'strip_tags' => 0, |
| 145 | - ), |
|
| 146 | - 'empty' => '', |
|
| 147 | - 'hide_empty' => 0, |
|
| 148 | - 'empty_zero' => 0, |
|
| 149 | - 'hide_alter_empty' => 1, |
|
| 150 | - 'exclude' => 1, |
|
| 151 | - 'id' => 'nothing_4', |
|
| 152 | - 'table' => 'views', |
|
| 153 | - 'field' => 'nothing', |
|
| 154 | - 'relationship' => 'none', |
|
| 145 | + ), |
|
| 146 | + 'empty' => '', |
|
| 147 | + 'hide_empty' => 0, |
|
| 148 | + 'empty_zero' => 0, |
|
| 149 | + 'hide_alter_empty' => 1, |
|
| 150 | + 'exclude' => 1, |
|
| 151 | + 'id' => 'nothing_4', |
|
| 152 | + 'table' => 'views', |
|
| 153 | + 'field' => 'nothing', |
|
| 154 | + 'relationship' => 'none', |
|
| 155 | 155 | ), |
| 156 | 156 | 'nothing_5' => array( |
| 157 | - 'label' => 'Computers on this account', |
|
| 158 | - 'alter' => array( |
|
| 157 | + 'label' => 'Computers on this account', |
|
| 158 | + 'alter' => array( |
|
| 159 | 159 | 'text' => 'View', |
| 160 | 160 | 'make_link' => 1, |
| 161 | 161 | 'path' => 'account/computers', |
@@ -171,19 +171,19 @@ discard block |
||
| 171 | 171 | 'ellipsis' => 1, |
| 172 | 172 | 'html' => 0, |
| 173 | 173 | 'strip_tags' => 0, |
| 174 | - ), |
|
| 175 | - 'empty' => '', |
|
| 176 | - 'hide_empty' => 0, |
|
| 177 | - 'empty_zero' => 0, |
|
| 178 | - 'exclude' => 0, |
|
| 179 | - 'id' => 'nothing_5', |
|
| 180 | - 'table' => 'views', |
|
| 181 | - 'field' => 'nothing', |
|
| 182 | - 'relationship' => 'none', |
|
| 174 | + ), |
|
| 175 | + 'empty' => '', |
|
| 176 | + 'hide_empty' => 0, |
|
| 177 | + 'empty_zero' => 0, |
|
| 178 | + 'exclude' => 0, |
|
| 179 | + 'id' => 'nothing_5', |
|
| 180 | + 'table' => 'views', |
|
| 181 | + 'field' => 'nothing', |
|
| 182 | + 'relationship' => 'none', |
|
| 183 | 183 | ), |
| 184 | 184 | 'nothing_6' => array( |
| 185 | - 'label' => 'Tasks', |
|
| 186 | - 'alter' => array( |
|
| 185 | + 'label' => 'Tasks', |
|
| 186 | + 'alter' => array( |
|
| 187 | 187 | 'text' => 'View', |
| 188 | 188 | 'make_link' => 1, |
| 189 | 189 | 'path' => 'account/tasks', |
@@ -199,19 +199,19 @@ discard block |
||
| 199 | 199 | 'ellipsis' => 1, |
| 200 | 200 | 'html' => 0, |
| 201 | 201 | 'strip_tags' => 0, |
| 202 | - ), |
|
| 203 | - 'empty' => '', |
|
| 204 | - 'hide_empty' => 0, |
|
| 205 | - 'empty_zero' => 0, |
|
| 206 | - 'exclude' => 0, |
|
| 207 | - 'id' => 'nothing_6', |
|
| 208 | - 'table' => 'views', |
|
| 209 | - 'field' => 'nothing', |
|
| 210 | - 'relationship' => 'none', |
|
| 202 | + ), |
|
| 203 | + 'empty' => '', |
|
| 204 | + 'hide_empty' => 0, |
|
| 205 | + 'empty_zero' => 0, |
|
| 206 | + 'exclude' => 0, |
|
| 207 | + 'id' => 'nothing_6', |
|
| 208 | + 'table' => 'views', |
|
| 209 | + 'field' => 'nothing', |
|
| 210 | + 'relationship' => 'none', |
|
| 211 | 211 | ), |
| 212 | 212 | 'cross_project_id' => array( |
| 213 | - 'label' => 'Cross-project statistics', |
|
| 214 | - 'alter' => array( |
|
| 213 | + 'label' => 'Cross-project statistics', |
|
| 214 | + 'alter' => array( |
|
| 215 | 215 | 'alter_text' => 0, |
| 216 | 216 | 'text' => '', |
| 217 | 217 | 'make_link' => 0, |
@@ -228,22 +228,22 @@ discard block |
||
| 228 | 228 | 'ellipsis' => 1, |
| 229 | 229 | 'html' => 0, |
| 230 | 230 | 'strip_tags' => 0, |
| 231 | - ), |
|
| 232 | - 'empty' => '', |
|
| 233 | - 'hide_empty' => 0, |
|
| 234 | - 'empty_zero' => 0, |
|
| 235 | - 'exclude' => 1, |
|
| 236 | - 'id' => 'cross_project_id', |
|
| 237 | - 'table' => 'user', |
|
| 238 | - 'field' => 'cross_project_id', |
|
| 239 | - 'relationship' => 'none', |
|
| 240 | - 'override' => array( |
|
| 231 | + ), |
|
| 232 | + 'empty' => '', |
|
| 233 | + 'hide_empty' => 0, |
|
| 234 | + 'empty_zero' => 0, |
|
| 235 | + 'exclude' => 1, |
|
| 236 | + 'id' => 'cross_project_id', |
|
| 237 | + 'table' => 'user', |
|
| 238 | + 'field' => 'cross_project_id', |
|
| 239 | + 'relationship' => 'none', |
|
| 240 | + 'override' => array( |
|
| 241 | 241 | 'button' => 'Override', |
| 242 | - ), |
|
| 242 | + ), |
|
| 243 | 243 | ), |
| 244 | 244 | 'nothing_8' => array( |
| 245 | - 'label' => 'Certificate', |
|
| 246 | - 'alter' => array( |
|
| 245 | + 'label' => 'Certificate', |
|
| 246 | + 'alter' => array( |
|
| 247 | 247 | 'text' => '<a href="account/certs">Account</a> | <a href="account/certs/all">Cross-project</a>', |
| 248 | 248 | 'make_link' => 0, |
| 249 | 249 | 'path' => '', |
@@ -259,129 +259,129 @@ discard block |
||
| 259 | 259 | 'ellipsis' => 1, |
| 260 | 260 | 'html' => 0, |
| 261 | 261 | 'strip_tags' => 0, |
| 262 | - ), |
|
| 263 | - 'empty' => '', |
|
| 264 | - 'hide_empty' => 0, |
|
| 265 | - 'empty_zero' => 0, |
|
| 266 | - 'exclude' => 0, |
|
| 267 | - 'id' => 'nothing_8', |
|
| 268 | - 'table' => 'views', |
|
| 269 | - 'field' => 'nothing', |
|
| 270 | - 'relationship' => 'none', |
|
| 262 | + ), |
|
| 263 | + 'empty' => '', |
|
| 264 | + 'hide_empty' => 0, |
|
| 265 | + 'empty_zero' => 0, |
|
| 266 | + 'exclude' => 0, |
|
| 267 | + 'id' => 'nothing_8', |
|
| 268 | + 'table' => 'views', |
|
| 269 | + 'field' => 'nothing', |
|
| 270 | + 'relationship' => 'none', |
|
| 271 | 271 | ), |
| 272 | - )); |
|
| 273 | - $handler->override_option('arguments', array( |
|
| 272 | + )); |
|
| 273 | + $handler->override_option('arguments', array( |
|
| 274 | 274 | 'id' => array( |
| 275 | - 'default_action' => 'default', |
|
| 276 | - 'style_plugin' => 'default_summary', |
|
| 277 | - 'style_options' => array(), |
|
| 278 | - 'wildcard' => 'all', |
|
| 279 | - 'wildcard_substitution' => 'All', |
|
| 280 | - 'title' => '', |
|
| 281 | - 'breadcrumb' => '', |
|
| 282 | - 'default_argument_type' => 'current_user', |
|
| 283 | - 'default_argument' => '', |
|
| 284 | - 'validate_type' => 'numeric', |
|
| 285 | - 'validate_fail' => 'not found', |
|
| 286 | - 'break_phrase' => 0, |
|
| 287 | - 'not' => 0, |
|
| 288 | - 'id' => 'id', |
|
| 289 | - 'table' => 'user', |
|
| 290 | - 'field' => 'id', |
|
| 291 | - 'validate_user_argument_type' => 'uid', |
|
| 292 | - 'validate_user_roles' => array( |
|
| 275 | + 'default_action' => 'default', |
|
| 276 | + 'style_plugin' => 'default_summary', |
|
| 277 | + 'style_options' => array(), |
|
| 278 | + 'wildcard' => 'all', |
|
| 279 | + 'wildcard_substitution' => 'All', |
|
| 280 | + 'title' => '', |
|
| 281 | + 'breadcrumb' => '', |
|
| 282 | + 'default_argument_type' => 'current_user', |
|
| 283 | + 'default_argument' => '', |
|
| 284 | + 'validate_type' => 'numeric', |
|
| 285 | + 'validate_fail' => 'not found', |
|
| 286 | + 'break_phrase' => 0, |
|
| 287 | + 'not' => 0, |
|
| 288 | + 'id' => 'id', |
|
| 289 | + 'table' => 'user', |
|
| 290 | + 'field' => 'id', |
|
| 291 | + 'validate_user_argument_type' => 'uid', |
|
| 292 | + 'validate_user_roles' => array( |
|
| 293 | 293 | 2 => 0, |
| 294 | 294 | 4 => 0, |
| 295 | 295 | 7 => 0, |
| 296 | 296 | 5 => 0, |
| 297 | 297 | 3 => 0, |
| 298 | 298 | 6 => 0, |
| 299 | - ), |
|
| 300 | - 'relationship' => 'none', |
|
| 301 | - 'default_options_div_prefix' => '', |
|
| 302 | - 'default_argument_fixed' => '', |
|
| 303 | - 'default_argument_user' => 0, |
|
| 304 | - 'default_argument_php' => '', |
|
| 305 | - 'validate_argument_node_type' => array( |
|
| 299 | + ), |
|
| 300 | + 'relationship' => 'none', |
|
| 301 | + 'default_options_div_prefix' => '', |
|
| 302 | + 'default_argument_fixed' => '', |
|
| 303 | + 'default_argument_user' => 0, |
|
| 304 | + 'default_argument_php' => '', |
|
| 305 | + 'validate_argument_node_type' => array( |
|
| 306 | 306 | 'page' => 0, |
| 307 | 307 | 'news' => 0, |
| 308 | 308 | 'profile' => 0, |
| 309 | 309 | 'forum' => 0, |
| 310 | 310 | 'panel' => 0, |
| 311 | 311 | 'story' => 0, |
| 312 | - ), |
|
| 313 | - 'validate_argument_node_access' => 0, |
|
| 314 | - 'validate_argument_nid_type' => 'nid', |
|
| 315 | - 'validate_argument_vocabulary' => array( |
|
| 312 | + ), |
|
| 313 | + 'validate_argument_node_access' => 0, |
|
| 314 | + 'validate_argument_nid_type' => 'nid', |
|
| 315 | + 'validate_argument_vocabulary' => array( |
|
| 316 | 316 | 1 => 0, |
| 317 | 317 | 2 => 0, |
| 318 | - ), |
|
| 319 | - 'validate_argument_type' => 'tid', |
|
| 320 | - 'validate_argument_transform' => 0, |
|
| 321 | - 'validate_user_restrict_roles' => 0, |
|
| 322 | - 'validate_argument_php' => '', |
|
| 323 | - 'override' => array( |
|
| 318 | + ), |
|
| 319 | + 'validate_argument_type' => 'tid', |
|
| 320 | + 'validate_argument_transform' => 0, |
|
| 321 | + 'validate_user_restrict_roles' => 0, |
|
| 322 | + 'validate_argument_php' => '', |
|
| 323 | + 'override' => array( |
|
| 324 | 324 | 'button' => 'Override', |
| 325 | - ), |
|
| 326 | - 'me_redirect' => 0, |
|
| 327 | - 'me_validate_user_argument_type' => 'uid', |
|
| 328 | - 'me_validate_user_roles' => array( |
|
| 325 | + ), |
|
| 326 | + 'me_redirect' => 0, |
|
| 327 | + 'me_validate_user_argument_type' => 'uid', |
|
| 328 | + 'me_validate_user_roles' => array( |
|
| 329 | 329 | 2 => 0, |
| 330 | 330 | 4 => 0, |
| 331 | 331 | 7 => 0, |
| 332 | 332 | 5 => 0, |
| 333 | 333 | 3 => 0, |
| 334 | 334 | 6 => 0, |
| 335 | - ), |
|
| 336 | - 'default_taxonomy_tid_term_page' => 0, |
|
| 337 | - 'default_taxonomy_tid_node' => 0, |
|
| 338 | - 'default_taxonomy_tid_limit' => 0, |
|
| 339 | - 'default_taxonomy_tid_vids' => array( |
|
| 335 | + ), |
|
| 336 | + 'default_taxonomy_tid_term_page' => 0, |
|
| 337 | + 'default_taxonomy_tid_node' => 0, |
|
| 338 | + 'default_taxonomy_tid_limit' => 0, |
|
| 339 | + 'default_taxonomy_tid_vids' => array( |
|
| 340 | 340 | 1 => 0, |
| 341 | 341 | 2 => 0, |
| 342 | - ), |
|
| 343 | - 'validate_argument_node_flag_name' => '*relationship*', |
|
| 344 | - 'validate_argument_node_flag_test' => 'flaggable', |
|
| 345 | - 'validate_argument_node_flag_id_type' => 'id', |
|
| 346 | - 'validate_argument_user_flag_name' => '*relationship*', |
|
| 347 | - 'validate_argument_user_flag_test' => 'flaggable', |
|
| 348 | - 'validate_argument_user_flag_id_type' => 'id', |
|
| 349 | - 'me_validate_user_restrict_roles' => 0, |
|
| 342 | + ), |
|
| 343 | + 'validate_argument_node_flag_name' => '*relationship*', |
|
| 344 | + 'validate_argument_node_flag_test' => 'flaggable', |
|
| 345 | + 'validate_argument_node_flag_id_type' => 'id', |
|
| 346 | + 'validate_argument_user_flag_name' => '*relationship*', |
|
| 347 | + 'validate_argument_user_flag_test' => 'flaggable', |
|
| 348 | + 'validate_argument_user_flag_id_type' => 'id', |
|
| 349 | + 'me_validate_user_restrict_roles' => 0, |
|
| 350 | 350 | ), |
| 351 | - )); |
|
| 352 | - $handler->override_option('access', array( |
|
| 351 | + )); |
|
| 352 | + $handler->override_option('access', array( |
|
| 353 | 353 | 'type' => 'none', |
| 354 | - )); |
|
| 355 | - $handler->override_option('cache', array( |
|
| 354 | + )); |
|
| 355 | + $handler->override_option('cache', array( |
|
| 356 | 356 | 'type' => 'none', |
| 357 | - )); |
|
| 358 | - $handler->override_option('css_class', 'stats'); |
|
| 359 | - $handler->override_option('header_format', '1'); |
|
| 360 | - $handler->override_option('header_empty', 0); |
|
| 361 | - $handler->override_option('style_options', array( |
|
| 357 | + )); |
|
| 358 | + $handler->override_option('css_class', 'stats'); |
|
| 359 | + $handler->override_option('header_format', '1'); |
|
| 360 | + $handler->override_option('header_empty', 0); |
|
| 361 | + $handler->override_option('style_options', array( |
|
| 362 | 362 | 'grouping' => '', |
| 363 | - )); |
|
| 364 | - $handler = $view->new_display('page', 'Page', 'page_1'); |
|
| 365 | - $handler->override_option('path', 'account/obsolete'); |
|
| 366 | - $handler->override_option('menu', array( |
|
| 363 | + )); |
|
| 364 | + $handler = $view->new_display('page', 'Page', 'page_1'); |
|
| 365 | + $handler->override_option('path', 'account/obsolete'); |
|
| 366 | + $handler->override_option('menu', array( |
|
| 367 | 367 | 'type' => 'tab', |
| 368 | 368 | 'title' => 'Obsolete', |
| 369 | 369 | 'description' => '', |
| 370 | 370 | 'weight' => '0', |
| 371 | 371 | 'name' => 'navigation', |
| 372 | - )); |
|
| 373 | - $handler->override_option('tab_options', array( |
|
| 372 | + )); |
|
| 373 | + $handler->override_option('tab_options', array( |
|
| 374 | 374 | 'type' => 'none', |
| 375 | 375 | 'title' => '', |
| 376 | 376 | 'description' => '', |
| 377 | 377 | 'weight' => 0, |
| 378 | 378 | 'name' => 'navigation', |
| 379 | - )); |
|
| 380 | - $handler = $view->new_display('panel_pane', 'Credit status', 'panel_pane_1'); |
|
| 381 | - $handler->override_option('fields', array( |
|
| 379 | + )); |
|
| 380 | + $handler = $view->new_display('panel_pane', 'Credit status', 'panel_pane_1'); |
|
| 381 | + $handler->override_option('fields', array( |
|
| 382 | 382 | 'id' => array( |
| 383 | - 'label' => 'User ID', |
|
| 384 | - 'alter' => array( |
|
| 383 | + 'label' => 'User ID', |
|
| 384 | + 'alter' => array( |
|
| 385 | 385 | 'alter_text' => 0, |
| 386 | 386 | 'text' => '', |
| 387 | 387 | 'make_link' => 0, |
@@ -398,28 +398,28 @@ discard block |
||
| 398 | 398 | 'ellipsis' => 1, |
| 399 | 399 | 'html' => 0, |
| 400 | 400 | 'strip_tags' => 0, |
| 401 | - ), |
|
| 402 | - 'empty' => '', |
|
| 403 | - 'hide_empty' => 0, |
|
| 404 | - 'empty_zero' => 0, |
|
| 405 | - 'set_precision' => FALSE, |
|
| 406 | - 'precision' => 0, |
|
| 407 | - 'decimal' => '.', |
|
| 408 | - 'separator' => '', |
|
| 409 | - 'prefix' => '', |
|
| 410 | - 'suffix' => '', |
|
| 411 | - 'exclude' => 1, |
|
| 412 | - 'id' => 'id', |
|
| 413 | - 'table' => 'user', |
|
| 414 | - 'field' => 'id', |
|
| 415 | - 'relationship' => 'none', |
|
| 416 | - 'override' => array( |
|
| 401 | + ), |
|
| 402 | + 'empty' => '', |
|
| 403 | + 'hide_empty' => 0, |
|
| 404 | + 'empty_zero' => 0, |
|
| 405 | + 'set_precision' => FALSE, |
|
| 406 | + 'precision' => 0, |
|
| 407 | + 'decimal' => '.', |
|
| 408 | + 'separator' => '', |
|
| 409 | + 'prefix' => '', |
|
| 410 | + 'suffix' => '', |
|
| 411 | + 'exclude' => 1, |
|
| 412 | + 'id' => 'id', |
|
| 413 | + 'table' => 'user', |
|
| 414 | + 'field' => 'id', |
|
| 415 | + 'relationship' => 'none', |
|
| 416 | + 'override' => array( |
|
| 417 | 417 | 'button' => 'Use default', |
| 418 | - ), |
|
| 418 | + ), |
|
| 419 | 419 | ), |
| 420 | 420 | 'total_credit' => array( |
| 421 | - 'label' => 'Total credit', |
|
| 422 | - 'alter' => array( |
|
| 421 | + 'label' => 'Total credit', |
|
| 422 | + 'alter' => array( |
|
| 423 | 423 | 'alter_text' => 0, |
| 424 | 424 | 'text' => '', |
| 425 | 425 | 'make_link' => 0, |
@@ -436,25 +436,25 @@ discard block |
||
| 436 | 436 | 'ellipsis' => 1, |
| 437 | 437 | 'html' => 0, |
| 438 | 438 | 'strip_tags' => 0, |
| 439 | - ), |
|
| 440 | - 'empty' => '', |
|
| 441 | - 'hide_empty' => 0, |
|
| 442 | - 'empty_zero' => 0, |
|
| 443 | - 'set_precision' => 1, |
|
| 444 | - 'precision' => '0', |
|
| 445 | - 'decimal' => '.', |
|
| 446 | - 'separator' => ',', |
|
| 447 | - 'prefix' => '', |
|
| 448 | - 'suffix' => '', |
|
| 449 | - 'exclude' => 0, |
|
| 450 | - 'id' => 'total_credit', |
|
| 451 | - 'table' => 'user', |
|
| 452 | - 'field' => 'total_credit', |
|
| 453 | - 'relationship' => 'none', |
|
| 439 | + ), |
|
| 440 | + 'empty' => '', |
|
| 441 | + 'hide_empty' => 0, |
|
| 442 | + 'empty_zero' => 0, |
|
| 443 | + 'set_precision' => 1, |
|
| 444 | + 'precision' => '0', |
|
| 445 | + 'decimal' => '.', |
|
| 446 | + 'separator' => ',', |
|
| 447 | + 'prefix' => '', |
|
| 448 | + 'suffix' => '', |
|
| 449 | + 'exclude' => 0, |
|
| 450 | + 'id' => 'total_credit', |
|
| 451 | + 'table' => 'user', |
|
| 452 | + 'field' => 'total_credit', |
|
| 453 | + 'relationship' => 'none', |
|
| 454 | 454 | ), |
| 455 | 455 | 'expavg_credit' => array( |
| 456 | - 'label' => 'Recent avg', |
|
| 457 | - 'alter' => array( |
|
| 456 | + 'label' => 'Recent avg', |
|
| 457 | + 'alter' => array( |
|
| 458 | 458 | 'alter_text' => 0, |
| 459 | 459 | 'text' => '', |
| 460 | 460 | 'make_link' => 0, |
@@ -471,28 +471,28 @@ discard block |
||
| 471 | 471 | 'ellipsis' => 1, |
| 472 | 472 | 'html' => 0, |
| 473 | 473 | 'strip_tags' => 0, |
| 474 | - ), |
|
| 475 | - 'empty' => '', |
|
| 476 | - 'hide_empty' => 0, |
|
| 477 | - 'empty_zero' => 0, |
|
| 478 | - 'set_precision' => 1, |
|
| 479 | - 'precision' => '2', |
|
| 480 | - 'decimal' => '.', |
|
| 481 | - 'separator' => ',', |
|
| 482 | - 'prefix' => '', |
|
| 483 | - 'suffix' => '', |
|
| 484 | - 'exclude' => 0, |
|
| 485 | - 'id' => 'expavg_credit', |
|
| 486 | - 'table' => 'user', |
|
| 487 | - 'field' => 'expavg_credit', |
|
| 488 | - 'relationship' => 'none', |
|
| 489 | - 'override' => array( |
|
| 474 | + ), |
|
| 475 | + 'empty' => '', |
|
| 476 | + 'hide_empty' => 0, |
|
| 477 | + 'empty_zero' => 0, |
|
| 478 | + 'set_precision' => 1, |
|
| 479 | + 'precision' => '2', |
|
| 480 | + 'decimal' => '.', |
|
| 481 | + 'separator' => ',', |
|
| 482 | + 'prefix' => '', |
|
| 483 | + 'suffix' => '', |
|
| 484 | + 'exclude' => 0, |
|
| 485 | + 'id' => 'expavg_credit', |
|
| 486 | + 'table' => 'user', |
|
| 487 | + 'field' => 'expavg_credit', |
|
| 488 | + 'relationship' => 'none', |
|
| 489 | + 'override' => array( |
|
| 490 | 490 | 'button' => 'Use default', |
| 491 | - ), |
|
| 491 | + ), |
|
| 492 | 492 | ), |
| 493 | 493 | 'nothing_4' => array( |
| 494 | - 'label' => '', |
|
| 495 | - 'alter' => array( |
|
| 494 | + 'label' => '', |
|
| 495 | + 'alter' => array( |
|
| 496 | 496 | 'text' => 'Pending', |
| 497 | 497 | 'make_link' => 1, |
| 498 | 498 | 'path' => 'account/tasks/pending', |
@@ -510,23 +510,23 @@ discard block |
||
| 510 | 510 | 'ellipsis' => 1, |
| 511 | 511 | 'html' => 0, |
| 512 | 512 | 'strip_tags' => 0, |
| 513 | - ), |
|
| 514 | - 'empty' => '', |
|
| 515 | - 'hide_empty' => 0, |
|
| 516 | - 'empty_zero' => 0, |
|
| 517 | - 'hide_alter_empty' => 1, |
|
| 518 | - 'exclude' => 1, |
|
| 519 | - 'id' => 'nothing_4', |
|
| 520 | - 'table' => 'views', |
|
| 521 | - 'field' => 'nothing', |
|
| 522 | - 'relationship' => 'none', |
|
| 523 | - 'override' => array( |
|
| 513 | + ), |
|
| 514 | + 'empty' => '', |
|
| 515 | + 'hide_empty' => 0, |
|
| 516 | + 'empty_zero' => 0, |
|
| 517 | + 'hide_alter_empty' => 1, |
|
| 518 | + 'exclude' => 1, |
|
| 519 | + 'id' => 'nothing_4', |
|
| 520 | + 'table' => 'views', |
|
| 521 | + 'field' => 'nothing', |
|
| 522 | + 'relationship' => 'none', |
|
| 523 | + 'override' => array( |
|
| 524 | 524 | 'button' => 'Use default', |
| 525 | - ), |
|
| 525 | + ), |
|
| 526 | 526 | ), |
| 527 | 527 | 'nothing' => array( |
| 528 | - 'label' => '', |
|
| 529 | - 'alter' => array( |
|
| 528 | + 'label' => '', |
|
| 529 | + 'alter' => array( |
|
| 530 | 530 | 'text' => bts('Certificates', array(), NULL, 'boinc:account-dashboard'), |
| 531 | 531 | 'make_link' => 1, |
| 532 | 532 | 'path' => 'account/certs', |
@@ -544,23 +544,23 @@ discard block |
||
| 544 | 544 | 'ellipsis' => 1, |
| 545 | 545 | 'html' => 0, |
| 546 | 546 | 'strip_tags' => 0, |
| 547 | - ), |
|
| 548 | - 'empty' => '', |
|
| 549 | - 'hide_empty' => 0, |
|
| 550 | - 'empty_zero' => 0, |
|
| 551 | - 'hide_alter_empty' => 1, |
|
| 552 | - 'exclude' => 0, |
|
| 553 | - 'id' => 'nothing', |
|
| 554 | - 'table' => 'views', |
|
| 555 | - 'field' => 'nothing', |
|
| 556 | - 'override' => array( |
|
| 547 | + ), |
|
| 548 | + 'empty' => '', |
|
| 549 | + 'hide_empty' => 0, |
|
| 550 | + 'empty_zero' => 0, |
|
| 551 | + 'hide_alter_empty' => 1, |
|
| 552 | + 'exclude' => 0, |
|
| 553 | + 'id' => 'nothing', |
|
| 554 | + 'table' => 'views', |
|
| 555 | + 'field' => 'nothing', |
|
| 556 | + 'override' => array( |
|
| 557 | 557 | 'button' => 'Use default', |
| 558 | - ), |
|
| 559 | - 'relationship' => 'none', |
|
| 558 | + ), |
|
| 559 | + 'relationship' => 'none', |
|
| 560 | 560 | ), |
| 561 | 561 | 'nothing_1' => array( |
| 562 | - 'label' => '', |
|
| 563 | - 'alter' => array( |
|
| 562 | + 'label' => '', |
|
| 563 | + 'alter' => array( |
|
| 564 | 564 | 'text' => 'Cross-project', |
| 565 | 565 | 'make_link' => 1, |
| 566 | 566 | 'path' => 'account/certs/all', |
@@ -576,22 +576,22 @@ discard block |
||
| 576 | 576 | 'ellipsis' => 1, |
| 577 | 577 | 'html' => 0, |
| 578 | 578 | 'strip_tags' => 0, |
| 579 | - ), |
|
| 580 | - 'empty' => '', |
|
| 581 | - 'hide_empty' => 0, |
|
| 582 | - 'empty_zero' => 0, |
|
| 583 | - 'exclude' => 1, |
|
| 584 | - 'id' => 'nothing_1', |
|
| 585 | - 'table' => 'views', |
|
| 586 | - 'field' => 'nothing', |
|
| 587 | - 'override' => array( |
|
| 579 | + ), |
|
| 580 | + 'empty' => '', |
|
| 581 | + 'hide_empty' => 0, |
|
| 582 | + 'empty_zero' => 0, |
|
| 583 | + 'exclude' => 1, |
|
| 584 | + 'id' => 'nothing_1', |
|
| 585 | + 'table' => 'views', |
|
| 586 | + 'field' => 'nothing', |
|
| 587 | + 'override' => array( |
|
| 588 | 588 | 'button' => 'Use default', |
| 589 | - ), |
|
| 590 | - 'relationship' => 'none', |
|
| 589 | + ), |
|
| 590 | + 'relationship' => 'none', |
|
| 591 | 591 | ), |
| 592 | 592 | 'cross_project_id' => array( |
| 593 | - 'label' => '', |
|
| 594 | - 'alter' => array( |
|
| 593 | + 'label' => '', |
|
| 594 | + 'alter' => array( |
|
| 595 | 595 | 'alter_text' => 0, |
| 596 | 596 | 'text' => '<div class="chart"><img src="charts/user/[cross_project_id]" /></div>', |
| 597 | 597 | 'make_link' => 0, |
@@ -608,22 +608,22 @@ discard block |
||
| 608 | 608 | 'ellipsis' => 1, |
| 609 | 609 | 'html' => 0, |
| 610 | 610 | 'strip_tags' => 0, |
| 611 | - ), |
|
| 612 | - 'empty' => '', |
|
| 613 | - 'hide_empty' => 0, |
|
| 614 | - 'empty_zero' => 0, |
|
| 615 | - 'exclude' => 1, |
|
| 616 | - 'id' => 'cross_project_id', |
|
| 617 | - 'table' => 'user', |
|
| 618 | - 'field' => 'cross_project_id', |
|
| 619 | - 'relationship' => 'none', |
|
| 620 | - 'override' => array( |
|
| 611 | + ), |
|
| 612 | + 'empty' => '', |
|
| 613 | + 'hide_empty' => 0, |
|
| 614 | + 'empty_zero' => 0, |
|
| 615 | + 'exclude' => 1, |
|
| 616 | + 'id' => 'cross_project_id', |
|
| 617 | + 'table' => 'user', |
|
| 618 | + 'field' => 'cross_project_id', |
|
| 619 | + 'relationship' => 'none', |
|
| 620 | + 'override' => array( |
|
| 621 | 621 | 'button' => 'Use default', |
| 622 | - ), |
|
| 622 | + ), |
|
| 623 | 623 | ), |
| 624 | 624 | 'phpcode' => array( |
| 625 | - 'label' => '', |
|
| 626 | - 'alter' => array( |
|
| 625 | + 'label' => '', |
|
| 626 | + 'alter' => array( |
|
| 627 | 627 | 'alter_text' => 0, |
| 628 | 628 | 'text' => '', |
| 629 | 629 | 'make_link' => 0, |
@@ -642,32 +642,32 @@ discard block |
||
| 642 | 642 | 'ellipsis' => 1, |
| 643 | 643 | 'html' => 0, |
| 644 | 644 | 'strip_tags' => 0, |
| 645 | - ), |
|
| 646 | - 'empty' => '', |
|
| 647 | - 'hide_empty' => 0, |
|
| 648 | - 'empty_zero' => 0, |
|
| 649 | - 'hide_alter_empty' => 1, |
|
| 650 | - 'value' => '<?php global $base_path; ?> |
|
| 645 | + ), |
|
| 646 | + 'empty' => '', |
|
| 647 | + 'hide_empty' => 0, |
|
| 648 | + 'empty_zero' => 0, |
|
| 649 | + 'hide_alter_empty' => 1, |
|
| 650 | + 'value' => '<?php global $base_path; ?> |
|
| 651 | 651 | <?php $account = user_load(get_drupal_id($data->id)); ?> |
| 652 | 652 | <div class="chart"><img src="<?php echo "{$base_path}charts/user/{$account->boincuser_cpid}"; ?>" /></div>', |
| 653 | - 'exclude' => 0, |
|
| 654 | - 'id' => 'phpcode', |
|
| 655 | - 'table' => 'customfield', |
|
| 656 | - 'field' => 'phpcode', |
|
| 657 | - 'override' => array( |
|
| 653 | + 'exclude' => 0, |
|
| 654 | + 'id' => 'phpcode', |
|
| 655 | + 'table' => 'customfield', |
|
| 656 | + 'field' => 'phpcode', |
|
| 657 | + 'override' => array( |
|
| 658 | 658 | 'button' => 'Use default', |
| 659 | - ), |
|
| 660 | - 'relationship' => 'none', |
|
| 659 | + ), |
|
| 660 | + 'relationship' => 'none', |
|
| 661 | 661 | ), |
| 662 | - )); |
|
| 663 | - $handler->override_option('style_options', array()); |
|
| 664 | - $handler->override_option('pane_title', 'BOINC account stats detail'); |
|
| 665 | - $handler->override_option('pane_description', ''); |
|
| 666 | - $handler->override_option('pane_category', array( |
|
| 662 | + )); |
|
| 663 | + $handler->override_option('style_options', array()); |
|
| 664 | + $handler->override_option('pane_title', 'BOINC account stats detail'); |
|
| 665 | + $handler->override_option('pane_description', ''); |
|
| 666 | + $handler->override_option('pane_category', array( |
|
| 667 | 667 | 'name' => 'View panes', |
| 668 | 668 | 'weight' => 0, |
| 669 | - )); |
|
| 670 | - $handler->override_option('allow', array( |
|
| 669 | + )); |
|
| 670 | + $handler->override_option('allow', array( |
|
| 671 | 671 | 'use_pager' => FALSE, |
| 672 | 672 | 'items_per_page' => FALSE, |
| 673 | 673 | 'offset' => FALSE, |
@@ -677,15 +677,15 @@ discard block |
||
| 677 | 677 | 'title_override' => FALSE, |
| 678 | 678 | 'exposed_form' => FALSE, |
| 679 | 679 | 'fields_override' => FALSE, |
| 680 | - )); |
|
| 681 | - $handler->override_option('argument_input', array()); |
|
| 682 | - $handler->override_option('link_to_view', 0); |
|
| 683 | - $handler->override_option('inherit_panels_path', 0); |
|
| 684 | - $handler = $view->new_display('panel_pane', 'User overview', 'panel_pane_2'); |
|
| 685 | - $handler->override_option('fields', array( |
|
| 680 | + )); |
|
| 681 | + $handler->override_option('argument_input', array()); |
|
| 682 | + $handler->override_option('link_to_view', 0); |
|
| 683 | + $handler->override_option('inherit_panels_path', 0); |
|
| 684 | + $handler = $view->new_display('panel_pane', 'User overview', 'panel_pane_2'); |
|
| 685 | + $handler->override_option('fields', array( |
|
| 686 | 686 | 'id' => array( |
| 687 | - 'label' => 'User ID', |
|
| 688 | - 'alter' => array( |
|
| 687 | + 'label' => 'User ID', |
|
| 688 | + 'alter' => array( |
|
| 689 | 689 | 'alter_text' => 0, |
| 690 | 690 | 'text' => '', |
| 691 | 691 | 'make_link' => 0, |
@@ -704,32 +704,32 @@ discard block |
||
| 704 | 704 | 'ellipsis' => 1, |
| 705 | 705 | 'html' => 0, |
| 706 | 706 | 'strip_tags' => 0, |
| 707 | - ), |
|
| 708 | - 'empty' => '', |
|
| 709 | - 'hide_empty' => 0, |
|
| 710 | - 'empty_zero' => 0, |
|
| 711 | - 'hide_alter_empty' => 1, |
|
| 712 | - 'set_precision' => FALSE, |
|
| 713 | - 'precision' => 0, |
|
| 714 | - 'decimal' => '.', |
|
| 715 | - 'separator' => '', |
|
| 716 | - 'format_plural' => 0, |
|
| 717 | - 'format_plural_singular' => '1', |
|
| 718 | - 'format_plural_plural' => '@count', |
|
| 719 | - 'prefix' => '', |
|
| 720 | - 'suffix' => '', |
|
| 721 | - 'exclude' => 1, |
|
| 722 | - 'id' => 'id', |
|
| 723 | - 'table' => 'user', |
|
| 724 | - 'field' => 'id', |
|
| 725 | - 'relationship' => 'none', |
|
| 726 | - 'override' => array( |
|
| 707 | + ), |
|
| 708 | + 'empty' => '', |
|
| 709 | + 'hide_empty' => 0, |
|
| 710 | + 'empty_zero' => 0, |
|
| 711 | + 'hide_alter_empty' => 1, |
|
| 712 | + 'set_precision' => FALSE, |
|
| 713 | + 'precision' => 0, |
|
| 714 | + 'decimal' => '.', |
|
| 715 | + 'separator' => '', |
|
| 716 | + 'format_plural' => 0, |
|
| 717 | + 'format_plural_singular' => '1', |
|
| 718 | + 'format_plural_plural' => '@count', |
|
| 719 | + 'prefix' => '', |
|
| 720 | + 'suffix' => '', |
|
| 721 | + 'exclude' => 1, |
|
| 722 | + 'id' => 'id', |
|
| 723 | + 'table' => 'user', |
|
| 724 | + 'field' => 'id', |
|
| 725 | + 'relationship' => 'none', |
|
| 726 | + 'override' => array( |
|
| 727 | 727 | 'button' => 'Use default', |
| 728 | - ), |
|
| 728 | + ), |
|
| 729 | 729 | ), |
| 730 | 730 | 'total_credit' => array( |
| 731 | - 'label' => 'Total credit', |
|
| 732 | - 'alter' => array( |
|
| 731 | + 'label' => 'Total credit', |
|
| 732 | + 'alter' => array( |
|
| 733 | 733 | 'alter_text' => 0, |
| 734 | 734 | 'text' => '', |
| 735 | 735 | 'make_link' => 0, |
@@ -746,25 +746,25 @@ discard block |
||
| 746 | 746 | 'ellipsis' => 1, |
| 747 | 747 | 'html' => 0, |
| 748 | 748 | 'strip_tags' => 0, |
| 749 | - ), |
|
| 750 | - 'empty' => '', |
|
| 751 | - 'hide_empty' => 0, |
|
| 752 | - 'empty_zero' => 0, |
|
| 753 | - 'set_precision' => 1, |
|
| 754 | - 'precision' => '0', |
|
| 755 | - 'decimal' => '.', |
|
| 756 | - 'separator' => ',', |
|
| 757 | - 'prefix' => '', |
|
| 758 | - 'suffix' => '', |
|
| 759 | - 'exclude' => 0, |
|
| 760 | - 'id' => 'total_credit', |
|
| 761 | - 'table' => 'user', |
|
| 762 | - 'field' => 'total_credit', |
|
| 763 | - 'relationship' => 'none', |
|
| 749 | + ), |
|
| 750 | + 'empty' => '', |
|
| 751 | + 'hide_empty' => 0, |
|
| 752 | + 'empty_zero' => 0, |
|
| 753 | + 'set_precision' => 1, |
|
| 754 | + 'precision' => '0', |
|
| 755 | + 'decimal' => '.', |
|
| 756 | + 'separator' => ',', |
|
| 757 | + 'prefix' => '', |
|
| 758 | + 'suffix' => '', |
|
| 759 | + 'exclude' => 0, |
|
| 760 | + 'id' => 'total_credit', |
|
| 761 | + 'table' => 'user', |
|
| 762 | + 'field' => 'total_credit', |
|
| 763 | + 'relationship' => 'none', |
|
| 764 | 764 | ), |
| 765 | 765 | 'expavg_credit' => array( |
| 766 | - 'label' => 'Avg credit', |
|
| 767 | - 'alter' => array( |
|
| 766 | + 'label' => 'Avg credit', |
|
| 767 | + 'alter' => array( |
|
| 768 | 768 | 'alter_text' => 0, |
| 769 | 769 | 'text' => '', |
| 770 | 770 | 'make_link' => 0, |
@@ -783,32 +783,32 @@ discard block |
||
| 783 | 783 | 'ellipsis' => 1, |
| 784 | 784 | 'html' => 0, |
| 785 | 785 | 'strip_tags' => 0, |
| 786 | - ), |
|
| 787 | - 'empty' => '', |
|
| 788 | - 'hide_empty' => 0, |
|
| 789 | - 'empty_zero' => 0, |
|
| 790 | - 'hide_alter_empty' => 1, |
|
| 791 | - 'set_precision' => 1, |
|
| 792 | - 'precision' => '2', |
|
| 793 | - 'decimal' => '.', |
|
| 794 | - 'separator' => ',', |
|
| 795 | - 'format_plural' => 0, |
|
| 796 | - 'format_plural_singular' => '1', |
|
| 797 | - 'format_plural_plural' => '@count', |
|
| 798 | - 'prefix' => '', |
|
| 799 | - 'suffix' => '', |
|
| 800 | - 'exclude' => 0, |
|
| 801 | - 'id' => 'expavg_credit', |
|
| 802 | - 'table' => 'user', |
|
| 803 | - 'field' => 'expavg_credit', |
|
| 804 | - 'relationship' => 'none', |
|
| 805 | - 'override' => array( |
|
| 786 | + ), |
|
| 787 | + 'empty' => '', |
|
| 788 | + 'hide_empty' => 0, |
|
| 789 | + 'empty_zero' => 0, |
|
| 790 | + 'hide_alter_empty' => 1, |
|
| 791 | + 'set_precision' => 1, |
|
| 792 | + 'precision' => '2', |
|
| 793 | + 'decimal' => '.', |
|
| 794 | + 'separator' => ',', |
|
| 795 | + 'format_plural' => 0, |
|
| 796 | + 'format_plural_singular' => '1', |
|
| 797 | + 'format_plural_plural' => '@count', |
|
| 798 | + 'prefix' => '', |
|
| 799 | + 'suffix' => '', |
|
| 800 | + 'exclude' => 0, |
|
| 801 | + 'id' => 'expavg_credit', |
|
| 802 | + 'table' => 'user', |
|
| 803 | + 'field' => 'expavg_credit', |
|
| 804 | + 'relationship' => 'none', |
|
| 805 | + 'override' => array( |
|
| 806 | 806 | 'button' => 'Use default', |
| 807 | - ), |
|
| 807 | + ), |
|
| 808 | 808 | ), |
| 809 | 809 | 'phpcode_1' => array( |
| 810 | - 'label' => '', |
|
| 811 | - 'alter' => array( |
|
| 810 | + 'label' => '', |
|
| 811 | + 'alter' => array( |
|
| 812 | 812 | 'alter_text' => 0, |
| 813 | 813 | 'text' => '', |
| 814 | 814 | 'make_link' => 0, |
@@ -827,28 +827,28 @@ discard block |
||
| 827 | 827 | 'ellipsis' => 1, |
| 828 | 828 | 'html' => 0, |
| 829 | 829 | 'strip_tags' => 0, |
| 830 | - ), |
|
| 831 | - 'empty' => '', |
|
| 832 | - 'hide_empty' => 0, |
|
| 833 | - 'empty_zero' => 0, |
|
| 834 | - 'hide_alter_empty' => 1, |
|
| 835 | - 'value' => '<?php |
|
| 830 | + ), |
|
| 831 | + 'empty' => '', |
|
| 832 | + 'hide_empty' => 0, |
|
| 833 | + 'empty_zero' => 0, |
|
| 834 | + 'hide_alter_empty' => 1, |
|
| 835 | + 'value' => '<?php |
|
| 836 | 836 | |
| 837 | 837 | echo l(bts(\'Show computers\', array(), NULL, \'boinc:accountpage\'), \'account/\' . get_drupal_id($data->id) . \'/computers\'); |
| 838 | 838 | |
| 839 | 839 | ?>', |
| 840 | - 'exclude' => 0, |
|
| 841 | - 'id' => 'phpcode_1', |
|
| 842 | - 'table' => 'customfield', |
|
| 843 | - 'field' => 'phpcode', |
|
| 844 | - 'override' => array( |
|
| 840 | + 'exclude' => 0, |
|
| 841 | + 'id' => 'phpcode_1', |
|
| 842 | + 'table' => 'customfield', |
|
| 843 | + 'field' => 'phpcode', |
|
| 844 | + 'override' => array( |
|
| 845 | 845 | 'button' => 'Use default', |
| 846 | - ), |
|
| 847 | - 'relationship' => 'none', |
|
| 846 | + ), |
|
| 847 | + 'relationship' => 'none', |
|
| 848 | 848 | ), |
| 849 | 849 | 'cross_project_id' => array( |
| 850 | - 'label' => 'Cross-project statistics', |
|
| 851 | - 'alter' => array( |
|
| 850 | + 'label' => 'Cross-project statistics', |
|
| 851 | + 'alter' => array( |
|
| 852 | 852 | 'alter_text' => 0, |
| 853 | 853 | 'text' => '', |
| 854 | 854 | 'make_link' => 0, |
@@ -865,22 +865,22 @@ discard block |
||
| 865 | 865 | 'ellipsis' => 1, |
| 866 | 866 | 'html' => 0, |
| 867 | 867 | 'strip_tags' => 0, |
| 868 | - ), |
|
| 869 | - 'empty' => '', |
|
| 870 | - 'hide_empty' => 0, |
|
| 871 | - 'empty_zero' => 0, |
|
| 872 | - 'exclude' => 1, |
|
| 873 | - 'id' => 'cross_project_id', |
|
| 874 | - 'table' => 'user', |
|
| 875 | - 'field' => 'cross_project_id', |
|
| 876 | - 'relationship' => 'none', |
|
| 877 | - 'override' => array( |
|
| 868 | + ), |
|
| 869 | + 'empty' => '', |
|
| 870 | + 'hide_empty' => 0, |
|
| 871 | + 'empty_zero' => 0, |
|
| 872 | + 'exclude' => 1, |
|
| 873 | + 'id' => 'cross_project_id', |
|
| 874 | + 'table' => 'user', |
|
| 875 | + 'field' => 'cross_project_id', |
|
| 876 | + 'relationship' => 'none', |
|
| 877 | + 'override' => array( |
|
| 878 | 878 | 'button' => 'Override', |
| 879 | - ), |
|
| 879 | + ), |
|
| 880 | 880 | ), |
| 881 | 881 | 'phpcode' => array( |
| 882 | - 'label' => '', |
|
| 883 | - 'alter' => array( |
|
| 882 | + 'label' => '', |
|
| 883 | + 'alter' => array( |
|
| 884 | 884 | 'alter_text' => 0, |
| 885 | 885 | 'text' => '', |
| 886 | 886 | 'make_link' => 0, |
@@ -899,39 +899,39 @@ discard block |
||
| 899 | 899 | 'ellipsis' => 1, |
| 900 | 900 | 'html' => 0, |
| 901 | 901 | 'strip_tags' => 0, |
| 902 | - ), |
|
| 903 | - 'empty' => '', |
|
| 904 | - 'hide_empty' => 0, |
|
| 905 | - 'empty_zero' => 0, |
|
| 906 | - 'hide_alter_empty' => 1, |
|
| 907 | - 'value' => '<?php global $base_path; ?> |
|
| 902 | + ), |
|
| 903 | + 'empty' => '', |
|
| 904 | + 'hide_empty' => 0, |
|
| 905 | + 'empty_zero' => 0, |
|
| 906 | + 'hide_alter_empty' => 1, |
|
| 907 | + 'value' => '<?php global $base_path; ?> |
|
| 908 | 908 | <?php $account = user_load(get_drupal_id($data->id)); ?> |
| 909 | 909 | <div class="chart"><img src="<?php echo "{$base_path}charts/user/{$account->boincuser_cpid}/small"; ?>" /></div>', |
| 910 | - 'exclude' => 0, |
|
| 911 | - 'id' => 'phpcode', |
|
| 912 | - 'table' => 'customfield', |
|
| 913 | - 'field' => 'phpcode', |
|
| 914 | - 'override' => array( |
|
| 910 | + 'exclude' => 0, |
|
| 911 | + 'id' => 'phpcode', |
|
| 912 | + 'table' => 'customfield', |
|
| 913 | + 'field' => 'phpcode', |
|
| 914 | + 'override' => array( |
|
| 915 | 915 | 'button' => 'Use default', |
| 916 | - ), |
|
| 917 | - 'relationship' => 'none', |
|
| 916 | + ), |
|
| 917 | + 'relationship' => 'none', |
|
| 918 | 918 | ), |
| 919 | - )); |
|
| 920 | - $handler->override_option('title', 'Statistics'); |
|
| 921 | - $handler->override_option('empty', 'empty...'); |
|
| 922 | - $handler->override_option('empty_format', '5'); |
|
| 923 | - $handler->override_option('row_options', array( |
|
| 919 | + )); |
|
| 920 | + $handler->override_option('title', 'Statistics'); |
|
| 921 | + $handler->override_option('empty', 'empty...'); |
|
| 922 | + $handler->override_option('empty_format', '5'); |
|
| 923 | + $handler->override_option('row_options', array( |
|
| 924 | 924 | 'inline' => array(), |
| 925 | 925 | 'separator' => '', |
| 926 | 926 | 'hide_empty' => 0, |
| 927 | - )); |
|
| 928 | - $handler->override_option('pane_title', 'BOINC account stats overview'); |
|
| 929 | - $handler->override_option('pane_description', ''); |
|
| 930 | - $handler->override_option('pane_category', array( |
|
| 927 | + )); |
|
| 928 | + $handler->override_option('pane_title', 'BOINC account stats overview'); |
|
| 929 | + $handler->override_option('pane_description', ''); |
|
| 930 | + $handler->override_option('pane_category', array( |
|
| 931 | 931 | 'name' => 'View panes', |
| 932 | 932 | 'weight' => 0, |
| 933 | - )); |
|
| 934 | - $handler->override_option('allow', array( |
|
| 933 | + )); |
|
| 934 | + $handler->override_option('allow', array( |
|
| 935 | 935 | 'use_pager' => 0, |
| 936 | 936 | 'items_per_page' => 0, |
| 937 | 937 | 'offset' => 0, |
@@ -941,21 +941,21 @@ discard block |
||
| 941 | 941 | 'title_override' => 'title_override', |
| 942 | 942 | 'exposed_form' => 0, |
| 943 | 943 | 'fields_override' => 0, |
| 944 | - )); |
|
| 945 | - $handler->override_option('argument_input', array( |
|
| 944 | + )); |
|
| 945 | + $handler->override_option('argument_input', array( |
|
| 946 | 946 | 'id' => array( |
| 947 | - 'type' => 'panel', |
|
| 948 | - 'context' => 'node_edit_form.author-mail-raw', |
|
| 949 | - 'context_optional' => 0, |
|
| 950 | - 'panel' => '0', |
|
| 951 | - 'fixed' => '', |
|
| 952 | - 'label' => 'BOINC: Id', |
|
| 947 | + 'type' => 'panel', |
|
| 948 | + 'context' => 'node_edit_form.author-mail-raw', |
|
| 949 | + 'context_optional' => 0, |
|
| 950 | + 'panel' => '0', |
|
| 951 | + 'fixed' => '', |
|
| 952 | + 'label' => 'BOINC: Id', |
|
| 953 | 953 | ), |
| 954 | - )); |
|
| 955 | - $handler->override_option('link_to_view', 0); |
|
| 956 | - $handler->override_option('inherit_panels_path', 0); |
|
| 954 | + )); |
|
| 955 | + $handler->override_option('link_to_view', 0); |
|
| 956 | + $handler->override_option('inherit_panels_path', 0); |
|
| 957 | 957 | |
| 958 | - $views[$view->name] = $view; |
|
| 958 | + $views[$view->name] = $view; |
|
| 959 | 959 | |
| 960 | - return $views; |
|
| 960 | + return $views; |
|
| 961 | 961 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $view->base_table = 'user'; |
| 15 | 15 | $view->core = 0; |
| 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 | 'id' => array( |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | 'empty' => '', |
| 41 | 41 | 'hide_empty' => 0, |
| 42 | 42 | 'empty_zero' => 0, |
| 43 | - 'set_precision' => FALSE, |
|
| 43 | + 'set_precision' => false, |
|
| 44 | 44 | 'precision' => 0, |
| 45 | 45 | 'decimal' => '.', |
| 46 | 46 | 'separator' => '', |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | 'empty' => '', |
| 403 | 403 | 'hide_empty' => 0, |
| 404 | 404 | 'empty_zero' => 0, |
| 405 | - 'set_precision' => FALSE, |
|
| 405 | + 'set_precision' => false, |
|
| 406 | 406 | 'precision' => 0, |
| 407 | 407 | 'decimal' => '.', |
| 408 | 408 | 'separator' => '', |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | 'nothing' => array( |
| 528 | 528 | 'label' => '', |
| 529 | 529 | 'alter' => array( |
| 530 | - 'text' => bts('Certificates', array(), NULL, 'boinc:account-dashboard'), |
|
| 530 | + 'text' => bts('Certificates', array(), null, 'boinc:account-dashboard'), |
|
| 531 | 531 | 'make_link' => 1, |
| 532 | 532 | 'path' => 'account/certs', |
| 533 | 533 | 'absolute' => 0, |
@@ -668,15 +668,15 @@ discard block |
||
| 668 | 668 | 'weight' => 0, |
| 669 | 669 | )); |
| 670 | 670 | $handler->override_option('allow', array( |
| 671 | - 'use_pager' => FALSE, |
|
| 672 | - 'items_per_page' => FALSE, |
|
| 673 | - 'offset' => FALSE, |
|
| 674 | - 'link_to_view' => FALSE, |
|
| 675 | - 'more_link' => FALSE, |
|
| 676 | - 'path_override' => FALSE, |
|
| 677 | - 'title_override' => FALSE, |
|
| 678 | - 'exposed_form' => FALSE, |
|
| 679 | - 'fields_override' => FALSE, |
|
| 671 | + 'use_pager' => false, |
|
| 672 | + 'items_per_page' => false, |
|
| 673 | + 'offset' => false, |
|
| 674 | + 'link_to_view' => false, |
|
| 675 | + 'more_link' => false, |
|
| 676 | + 'path_override' => false, |
|
| 677 | + 'title_override' => false, |
|
| 678 | + 'exposed_form' => false, |
|
| 679 | + 'fields_override' => false, |
|
| 680 | 680 | )); |
| 681 | 681 | $handler->override_option('argument_input', array()); |
| 682 | 682 | $handler->override_option('link_to_view', 0); |
@@ -709,7 +709,7 @@ discard block |
||
| 709 | 709 | 'hide_empty' => 0, |
| 710 | 710 | 'empty_zero' => 0, |
| 711 | 711 | 'hide_alter_empty' => 1, |
| 712 | - 'set_precision' => FALSE, |
|
| 712 | + 'set_precision' => false, |
|
| 713 | 713 | 'precision' => 0, |
| 714 | 714 | 'decimal' => '.', |
| 715 | 715 | 'separator' => '', |
@@ -4,19 +4,19 @@ |
||
| 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 | } |
@@ -4,18 +4,18 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -46,8 +46,8 @@ |
||
| 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 | } |
@@ -4,19 +4,19 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 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 |
||
| 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; |
@@ -104,8 +104,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -2,9 +2,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -68,10 +68,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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> · "; |
|
| 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> · "; |
|
| 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(); |
@@ -4,18 +4,18 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -82,9 +82,9 @@ |
||
| 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 | } |
@@ -4,18 +4,18 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -27,10 +27,10 @@ |
||
| 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 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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( |
@@ -4,22 +4,22 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |