Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal: Fixed misc PHP problems #3057

Merged
merged 1 commit into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions drupal/sites/default/boinc/modules/boincuser/boincuser.module
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function boincuser_user($op, &$edit, &$account, $category = NULL) {

require_boinc('password_compat/password');
// Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
if ($account->uid > 1) {
if (isset($account->uid) && ($account->uid > 1)) {
switch($op) {
case 'load':
// User loading; insert BOINC data into the user object
Expand Down Expand Up @@ -1406,7 +1406,9 @@ function boincuser_token_list($type = 'all') {
* Implementation of hook_views_pre_execute()
*/
function boincuser_views_pre_execute(&$view) {
$account_id = $view->args[0];
if ($view->args) {
$account_id = $view->args[0];
}
if ($view->name=="user_activity") {
// Run the following custom query for the user_activity view
$view->build_info['query']= "
Expand Down
1 change: 1 addition & 0 deletions drupal/sites/default/boinc/themes/boinc/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function boinc_theme(&$existing, $type, $theme, $path) {
* Adjust the rendering of the menu
*/
function boinc_links__system_main_menu($links, $menu, $element) {
$html = '';
$html .= '<ul id="' . $menu['id'] . '" class="' . $menu['class'] . '">' . "\n";
$item_count = count($links);
$i = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@

<?php print $highlight; ?>

<?php if ($title): ?>
<?php if (!empty($title)): ?>
<h1 class="title"><?php print $title; ?></h1>
<?php endif; ?>
<?php print $help; ?>
Expand Down