Commit bf19ab7c authored by Tristan Olive's avatar Tristan Olive

Updated task and computers pages on account to redirect to the login page when needed

(DBOINCP-207)
parent 8a53a598
......@@ -152,18 +152,18 @@ function user_account_host_list_views_default_views() {
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'value' => '<?php
require_boinc(\'stats_sites\');
global $host_sites;
$x = "";
foreach ($host_sites as $h) {
$url = $h[0];
$name = $h[1];
$img = $h[2];
$site_img = theme_image("sites/all/themes/einstein/shared/{$img}", $name, $name);
$x .= l($site_img, $url . $data->host_host_cpid, array(\'html\' => TRUE));
}
echo "Cross-project stats: {$x}";
'value' => '<?php
require_boinc(\'stats_sites\');
global $host_sites;
$x = "";
foreach ($host_sites as $h) {
$url = $h[0];
$name = $h[1];
$img = $h[2];
$site_img = theme_image("sites/all/themes/einstein/shared/{$img}", $name, $name);
$x .= l($site_img, $url . $data->host_host_cpid, array(\'html\' => TRUE));
}
echo "Cross-project stats: {$x}";
?>',
'exclude' => 0,
'id' => 'phpcode_4',
......@@ -366,9 +366,9 @@ function user_account_host_list_views_default_views() {
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'value' => '<?php
require_boinc(\'host\');
echo boinc_version($data->host_serialnum);
'value' => '<?php
require_boinc(\'host\');
echo boinc_version($data->host_serialnum);
?>',
'exclude' => 0,
'id' => 'phpcode',
......@@ -486,9 +486,9 @@ function user_account_host_list_views_default_views() {
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'value' => '<?php
require_boinc(\'host\');
echo gpu_desc($data->host_serialnum);
'value' => '<?php
require_boinc(\'host\');
echo gpu_desc($data->host_serialnum);
?>',
'exclude' => 0,
'id' => 'phpcode_1',
......@@ -639,7 +639,7 @@ function user_account_host_list_views_default_views() {
'default_argument_type' => 'current_user',
'default_argument' => '',
'validate_type' => 'php',
'validate_fail' => 'not found',
'validate_fail' => 'empty',
'break_phrase' => 0,
'not' => 0,
'id' => 'userid',
......@@ -648,9 +648,13 @@ function user_account_host_list_views_default_views() {
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
2 => 0,
3 => 0,
4 => 0,
5 => 0,
3519698132 => 0,
1110965548 => 0,
2938987599 => 0,
1257454314 => 0,
268174006 => 0,
1271379760 => 0,
933038561 => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
......@@ -659,6 +663,9 @@ function user_account_host_list_views_default_views() {
'default_argument_php' => '',
'validate_argument_node_type' => array(
'page' => 0,
'news' => 0,
'team' => 0,
'team_forum' => 0,
'profile' => 0,
'forum' => 0,
'panel' => 0,
......@@ -679,9 +686,13 @@ function user_account_host_list_views_default_views() {
'me_validate_user_argument_type' => 'uid',
'me_validate_user_roles' => array(
2 => 0,
3 => 0,
4 => 0,
5 => 0,
3519698132 => 0,
1110965548 => 0,
2938987599 => 0,
1257454314 => 0,
268174006 => 0,
1271379760 => 0,
933038561 => 0,
),
'default_taxonomy_tid_term_page' => 0,
'default_taxonomy_tid_node' => 0,
......@@ -705,8 +716,12 @@ function user_account_host_list_views_default_views() {
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('empty', ' ');
$handler->override_option('empty_format', '5');
$handler->override_option('empty', '<?php
if (!user_is_logged_in()) {
drupal_goto(\'user/login\', drupal_get_destination());
}
?>');
$handler->override_option('empty_format', '3');
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
......@@ -1443,10 +1458,10 @@ function user_account_host_list_views_default_views() {
),
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => 'if (arg(0) == \'account\' AND arg(1) == \'prefs\') {
$venue = arg(4);
if ($venue == \'default\') $venue = null;
}
'default_argument_php' => 'if (arg(0) == \'account\' AND arg(1) == \'prefs\') {
$venue = arg(4);
if ($venue == \'default\') $venue = null;
}
return $venue;',
'validate_argument_node_type' => array(
'forum' => 0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment