...
 
Commits (103)
......@@ -33,8 +33,8 @@ function boinc_standard_flag_default_flags() {
'title' => 'Comment Abuse',
'global' => FALSE,
'types' => array(
'0' => 'news',
'1' => 'forum',
'0' => 'forum',
'1' => 'news',
),
'flag_short' => 'Report',
'flag_long' => 'Report this content as offensive.',
......@@ -137,8 +137,8 @@ function boinc_standard_flag_default_flags() {
'title' => 'Subscriptions',
'global' => '0',
'types' => array(
'0' => 'news',
'1' => 'forum',
'0' => 'forum',
'1' => 'news',
),
'flag_short' => 'subscribe',
'flag_long' => 'Subscribe to this topic',
......
......@@ -6,46 +6,43 @@
function boinc_standard_input_formats() {
$input_formats = array();
$input_format = new stdClass;
$input_format->api_version = 1;
$input_format->name = 'PHP code';
$input_format->roles = array();
$input_format->cache = FALSE;
$input_format->settings = array(
);
$input_format->filters = array(
'php' => array(
'0' => '0',
),
);
$input_format->machine = 'php_code';
$input_formats['php_code'] = $input_format;
$input_format = new stdClass;
$input_format->api_version = 1;
$input_format->name = 'Rich text';
$input_format->roles = array(
1 => 'anonymous user',
2 => 'authenticated user',
3 => 'administrator',
4 => 'content editor',
5 => 'moderator',
3519698132 => 'administrator',
2938987599 => 'content editor',
1271379760 => 'moderator',
);
$input_format->cache = TRUE;
$input_format->settings = array(
// Settings for: tableofcontents module
'tableofcontents' => array(
// Hide the table of contents tags
'tableofcontents_hide_table' => 0,
// Whether an automatic table of content should be added
'tableofcontents_automatic' => '0',
// Number of headers before an automatic table of content is added
'tableofcontents_min_limit' => '5',
// Remove Table of Contents tags from teasers
'tableofcontents_remove_teaser' => 1,
// Allow users to override the settings within the table of contents tag itself
'tableofcontents_allow_override' => 1,
// Ensure title is safe (i.e. use check_plain() to avoid XSS attacks.)
'tableofcontents_safe_title' => 1,
// Table of Contents Title
'tableofcontents_title' => 'Table of Contents',
// Minimum heading level
'tableofcontents_minlevel' => '2',
'tableofcontents_maxlevel' => '2',
'tableofcontents_hide_show' => 0,
// Maximum heading level
'tableofcontents_maxlevel' => '3',
// Include link to hide/show table of contents
'tableofcontents_hide_show' => 1,
// Start with the table of content collapsed
'tableofcontents_collapsed' => 0,
// Select what is stripped from the header titles
'tableofcontents_id_stripping' => array(
'digits' => 0,
'dashes' => 0,
......@@ -53,53 +50,98 @@ function boinc_standard_input_formats() {
'underscores' => 0,
'colons' => 0,
),
// Identifier introducer
'tableofcontents_identifier_introducer' => 'header',
// Identifier and number separator
'tableofcontents_id_separator' => '-',
// How to generate missing header identifiers
'tableofcontents_id_generator' => 'title',
// List of tags allowed in table headers
'tableofcontents_allowed_tags' => '<em> <i> <strong> <b> <u> <del> <ins> <sub> <sup> <cite> <strike> <s> <tt> <span> <font> <abbr> <acronym> <dfn> <q> <bdo> <big> <small>',
// Add the comments to the table of contents
'tableofcontents_comments' => 0,
// Select header level at which comments start
'tableofcontents_comments_level' => '3',
'tableofcontents_back_to_top' => 'Back to top',
// Back to top label
'tableofcontents_back_to_top' => '',
// Back to top location
'tableofcontents_back_to_top_location' => 'bottom',
// Minimum level where Back to Top appears
'tableofcontents_back_to_top_minlevel' => '2',
'tableofcontents_back_to_top_maxlevel' => '2',
// Maximum level where Back to Top appears
'tableofcontents_back_to_top_maxlevel' => '4',
// Back to top anchor
'tableofcontents_back_to_top_anchor' => 'toc',
// Scroll back to the table of contents
'tableofcontents_scroll_back_to_top' => 0,
'tableofcontents_numbering' => '4',
// Numbering method
'tableofcontents_numbering' => '0',
// Add the number to the headers
'tableofcontents_number_headers' => 0,
// Numbering mode
'tableofcontents_number_mode' => '0',
// Numbering prefix
'tableofcontents_number_start_letter' => '',
// Numbering separator
'tableofcontents_number_separator' => '.',
// Numbering suffix
'tableofcontents_number_end_letter' => '.',
),
// Settings for: bbcode module
'bbcode' => array(
// Convert addresses to links
'bbcode_make_links' => '1',
// Spam link deterrent
'bbcode_filter_nofollow' => '0',
// Email address encoding
'bbcode_encode_mailto' => '1',
// Smart paragraph and line breaks
'bbcode_paragraph_breaks' => '2',
// Print debugging info
'bbcode_debug' => '0',
),
// Settings for: pathologic module
'pathologic' => array(
'filter_pathologic_local_paths' => '/',
// Also considered local
'filter_pathologic_local_paths' => '/
http://albertathome.org/
https://albertathome.org/',
// Output full absolute URLs
'filter_pathologic_absolute' => 1,
),
);
$input_format->filters = array(
'tableofcontents' => array(
// Delta => Weight for: Table of contents
'0' => '-10',
),
'bbcode' => array(
// Delta => Weight for: BBCode
'0' => '-9',
),
'pathologic' => array(
// Delta => Weight for: Pathologic
'0' => '-8',
),
);
$input_format->machine = 'rich_text';
$input_formats['rich_text'] = $input_format;
$input_format = new stdClass;
$input_format->api_version = 1;
$input_format->name = 'PHP code';
$input_format->roles = array();
$input_format->cache = FALSE;
$input_format->settings = array(
);
$input_format->filters = array(
'php' => array(
'0' => '0',
),
);
$input_format->machine = 'php_code';
$input_formats['php_code'] = $input_format;
return $input_formats;
}
......@@ -362,7 +362,7 @@ function boinc_standard_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'site_footer';
$strongarm->value = 'Copyright &copy; 2012 Einstein@Home. All rights reserved.';
$strongarm->value = 'Copyright &copy; 2014 Einstein@Home. All rights reserved.';
$export['site_footer'] = $strongarm;
$strongarm = new stdClass;
......
......@@ -36,7 +36,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => '',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
......@@ -51,7 +51,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => 'search/team/*',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
......@@ -66,7 +66,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => 'search/team/*',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
......@@ -81,7 +81,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => '',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$export['boinc'] = $theme;
......@@ -116,7 +116,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => '',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
......@@ -131,7 +131,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => 'search/team/*',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
......@@ -146,7 +146,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => 'search/team/*',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
......@@ -161,7 +161,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => '',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$export['einstein'] = $theme;
......@@ -196,7 +196,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => '',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
......@@ -211,7 +211,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => 'search/team/*',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
......@@ -226,7 +226,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => 'search/team/*',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
......@@ -241,7 +241,7 @@ function global_search_solr_default_fe_block_settings() {
'visibility' => '0',
'pages' => '',
'title' => '',
'cache' => '0',
'cache' => '-1',
);
$export['garland'] = $theme;
......
......@@ -4342,7 +4342,7 @@ Cross-project stats:
'hide_alter_empty' => 1,
'value' => '<?php
require_boinc(\'util\',\'host\');
echo sched_log_link($data->host_rpc_time);
echo host_sched_log_link($data->host_rpc_time, $data->id);
?>',
'exclude' => 0,
'id' => 'phpcode_2',
......
$base_url = 'http://albertathome.org';
......@@ -128,15 +128,16 @@ function boincteam_create_form(&$form_state) {
function boincteam_create_form_validate($form, &$form_state) {
$values = $form_state['values'];
$name = $values['name'];
if (!$values['name']) {
if (!$name) {
form_set_error('name', t('Team name is required.'));
}
else {
require_boinc('team');
if (lookup_team_name($name)) {
require_boinc('boinc_db');
if (BoincTeam::lookup_name($name)) {
form_set_error('name', t('A team named "@name" already exists.',
array('@name' => $values['name'])));
array('@name' => $name)));
}
}
......@@ -373,15 +374,16 @@ function boincteam_edit_form(&$form_state, $team_id) {
function boincteam_edit_form_validate($form, &$form_state) {
$values = $form_state['values'];
if (!$values['name']) {
$name = $values['name'];
if (!$name) {
form_set_error('name', t('Team name is required.'));
}
else {
require_boinc('team');
if (lookup_team_name($name)) {
require_boinc('boinc_db');
if (BoincTeam::lookup_name($name)) {
form_set_error('name', t('A team named "@name" already exists.',
array('@name' => $values['name'])));
array('@name' => $name)));
}
}
......
......@@ -297,11 +297,12 @@ function boincuser_user($op, &$edit, &$account, $category = NULL) {
case 'update':
if (isset($edit['update_source'])) {
$boinc_user = lookup_user_id($account->boincuser_id);
require_boinc('boinc_db');
$boinc_user = BoincUser::lookup_id($account->boincuser_id);
switch ($edit['update_source']) {
case 'user_account':
// Ensure that BOINC data is altered
$boinc_user = lookup_user_id($account->boincuser_id);
$boinc_user = BoincUser::lookup_id($account->boincuser_id);
$changing_email = ($edit['mail'] AND $edit['mail'] != $boinc_user->email_addr) ? true : false;
$changing_pass = ($edit['pass']) ? true : false;
if ($changing_email OR $changing_pass) {
......@@ -1046,6 +1047,7 @@ function join_page($type = null) {
* Create a new user account based on supplied parameters.
*/
function boincuser_create_account() {
require_boinc('boinc_db');
require_boinc('user');
require_boinc('xml');
$params = array(
......@@ -1073,7 +1075,7 @@ function boincuser_create_account() {
}
// Process input
$boinc_user = lookup_user_email_addr($params['email_addr']);
$boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
if ($boinc_user) {
// Return authenticator for existing users
if ($params['passwd_hash'] == $boinc_user->passwd_hash) {
......
......@@ -49,10 +49,10 @@ function boincuser_login_authenticate($form_values) {
$passwd_hash = md5($passwd.$email_addr);
// Include BOINC user library
require_boinc('user');
require_boinc('boinc_db');
// Get the BOINC user and check credentials
$boinc_user = lookup_user_email_addr($email_addr);
$boinc_user = BoincUser::lookup_email_addr($email_addr);
if (!$boinc_user) return false;
if ($passwd_hash != $boinc_user->passwd_hash) return false;
......@@ -93,10 +93,10 @@ function boincuser_login_register($boinc_user) {
* New user registration validation handler.
*/
function boincuser_register_validate($form_values) {
// Include BOINC user library
require_boinc('user');
// Include BOINC database objects library
require_boinc('boinc_db');
// Check for an existing BOINC user
$boinc_user = lookup_user_email_addr($form_values['mail']);
$boinc_user = BoincUser::lookup_email_addr($form_values['mail']);
if ($boinc_user) return false;
return true;
}
......@@ -329,15 +329,15 @@ function boincuser_pull_subscriptions($account = NULL) {
* User account update validation handler.
*/
function boincuser_account_validate($edit, $account) {
// Include BOINC user library, load BOINC account data
require_boinc('user');
$boinc_user = lookup_user_email_addr($account->mail);
// Include BOINC database objects library, load BOINC account data
require_boinc('boinc_db');
$boinc_user = BoincUser::lookup_email_addr($account->mail);
$changing_email = ($edit['mail'] AND $edit['mail'] != $account->mail) ? true : false;
$changing_pass = ($edit['pass']['pass1']) ? true : false;
//
if ($changing_email) {
// E-mail address is set to change; check for an existing BOINC user
$boinc_user_already_exists = lookup_user_email_addr($edit['mail']);
$boinc_user_already_exists = BoincUser::lookup_email_addr($edit['mail']);
if ($boinc_user_already_exists) {
form_set_error('mail', t('A BOINC account already exists for @email.', array('@email' => $edit['mail'])));
}
......@@ -382,8 +382,8 @@ function boincuser_request_pass_validate($form, &$form_state) {
// First look for an existing Drupal account
if ($account = user_load_by_mail($edit['name'])) return;
// Otherwise, check the BOINC db for this email address
require_boinc('db');
$boinc_user = lookup_user_email_addr($edit['name']);
require_boinc('boinc_db');
$boinc_user = BoincUser::lookup_email_addr($edit['name']);
if ($boinc_user) {
// If the user is in BOINC but not Drupal, bring them over...
boincuser_register_make_drupal_user($boinc_user);
......@@ -449,8 +449,8 @@ function boincuser_authloginform_validate($form, &$form_state) {
// We notify the form API that this field has failed validation.
form_set_error('authenticator', t('That authenticator is not valid.'));
} else {
require_boinc('db');
$boinc_user = lookup_user_auth($authenticator);
require_boinc('boinc_db');
$boinc_user = BoincUser::lookup_auth($authenticator);
if (!$boinc_user) form_set_error('authenticator', t('There is no account with that authenticator.'));
}
}
......@@ -460,8 +460,8 @@ function boincuser_authloginform_validate($form, &$form_state) {
*/
function boincuser_authloginform_submit($form, &$form_state) {
global $user;
require_boinc('db');
$boinc_user = lookup_user_auth($form_state['values']['authenticator']);
require_boinc('boinc_db');
$boinc_user = BoincUser::lookup_auth($form_state['values']['authenticator']);
if (!$user = user_load(get_drupal_id($boinc_user->id))) drupal_set_message(t('An unresolved error occurred while logging into this account.'));
else $form_state['redirect'] = "user/{$user->uid}/edit";
}
......@@ -389,9 +389,9 @@ function projectprefs_page($action = null, $venue = null) {
$_SESSION['prefs venue'] = 'generic';
// If the user has removed their default preference set, make it generic
require_boinc('user');
require_boinc('boinc_db');
global $user;
$boinc_user = lookup_user_email_addr($user->mail);
$boinc_user = BoincUser::lookup_email_addr($user->mail);
if ($boinc_user->venue == $venue) {
$boinc_user->venue = '';
venue_update($boinc_user);
......
......@@ -967,10 +967,10 @@ function boincwork_projectprefs_form_validate($form, &$form_state) {
* Handle post-validation submission of project preferences form.
*/
function boincwork_projectprefs_form_submit($form, &$form_state) {
require_boinc(array('user', 'prefs'));
require_boinc(array('boinc_db', 'prefs'));
global $user;
$boinc_user = lookup_user_email_addr($user->mail);
$boinc_user = BoincUser::lookup_email_addr($user->mail);
global $site_name, $app_types, $app_array;
......@@ -1192,10 +1192,10 @@ function communityprefs_form(&$form_state) {
* Handle post-validation submission of community preferences form.
*/
function communityprefs_form_submit($form, &$form_state) {
require_boinc('db');
require_boinc('boinc_db');
global $user;
$account = user_load($user->uid);
$boinc_user = lookup_user_id($account->boincuser_id);
$boinc_user = BoincUser::lookup_id($account->boincuser_id);
$edit= $form_state['values'];
// Display name
if ($edit['boincuser_name'] != $boinc_user->name) {
......
......@@ -1111,10 +1111,10 @@ function boincwork_views_host_list_empty_text($context = NULL) {
// Pull the BOINC user ID from the view arguments to get show_hosts
// preference for that user
require_boinc('db');
require_boinc('boinc_db');
$view = views_get_current_view();
$account = user_load($view->args[0]);
$boincuser = lookup_user_id($account->boincuser_id);
$boincuser = BoincUser::lookup_id($account->boincuser_id);
// Determine if hosts are associated at all or just hidden
$output = '';
......
......@@ -329,7 +329,7 @@
<ul id="server-status" class="tab-list">
<li class="first tab"><a href="/server_status.html">SERVER STATUS</a></li>
<li class="first tab"><a href="http://albert.phys.uwm.edu/server_status.html">SERVER STATUS</a></li>
<!--<li class="first tab">Server status</li>
<li class="tab">
<ul id="server-status-highlights">
......