#79511 by timcn. Clean up some notices.

5.x
Neil Drumm 2006-08-21 06:25:49 +00:00
parent 70179807c6
commit e48ec09993
3 changed files with 7 additions and 3 deletions

View File

@ -763,6 +763,10 @@ function theme_fieldset($element) {
if ($element['#collapsible']) {
drupal_add_js('misc/collapse.js');
if (!isset($element['#attributes']['class'])) {
$element['#attributes']['class'] = '';
}
$element['#attributes']['class'] .= ' collapsible';
if ($element['#collapsed']) {
$element['#attributes']['class'] .= ' collapsed';

View File

@ -27,7 +27,7 @@ function sess_read($key) {
$user = db_fetch_object(db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = '%s'", $key));
// We found the client's session record and they are an authenticated user
if ($user->uid > 0) {
if ($user && $user->uid > 0) {
// This is done to unserialize the data member of $user
$user = drupal_unpack($user);

View File

@ -140,7 +140,7 @@ function install_change_settings() {
if ($db_url == 'mysql://username:password@localhost/databasename') {
$db_user = $db_pass = $db_path = '';
}
$output = drupal_get_form('install_settings_form', $profile, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host);
$output = drupal_get_form('install_settings_form', $profile, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host, $db_path);
drupal_set_title('Database configuration');
print theme('install_page', $output);
exit;
@ -150,7 +150,7 @@ function install_change_settings() {
/**
* Form API array definition for install_settings.
*/
function install_settings_form($profile, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host) {
function install_settings_form($profile, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host, $db_path) {
$db_types = drupal_detect_database_types();
if (count($db_types) == 0) {
$form['no_db_types'] = array(