mirror of https://github.com/BOINC/boinc.git
Drupal: Fixed misc PHP problems
Fixed some misc PHP problems found with xdebug.
This commit is contained in:
parent
b098ea71c7
commit
eed8c81fe3
|
@ -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
|
||||
|
@ -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']= "
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; ?>
|
||||
|
|
Loading…
Reference in New Issue