Drupal: Fixed misc PHP problems

Fixed some misc PHP problems found with xdebug.
This commit is contained in:
Shawn Kwang 2019-01-15 15:49:55 -06:00
parent b098ea71c7
commit eed8c81fe3
3 changed files with 6 additions and 3 deletions

View File

@ -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']= "

View File

@ -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;

View File

@ -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; ?>