From b41525229be3e754f288e48e184626e53b211171 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 10 Dec 2005 23:20:21 +0000 Subject: - custom profile fields - prune users - prune forums git-svn-id: file:///svn/phpbb/trunk@5325 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_profile_fields.php | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'phpBB/includes/functions_profile_fields.php') diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 1ba203bcd6..606976c99b 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -303,9 +303,9 @@ class custom_profile case FIELD_DATE: $field_validate = explode('-', $field_value); - $day = (int) $field_validate[0]; - $month = (int) $field_validate[1]; - $year = (int) $field_validate[2]; + $day = (isset($field_validate[0])) ? (int) $field_validate[0] : 0; + $month = (isset($field_validate[1])) ? (int) $field_validate[1] : 0; + $year = (isset($field_validate[2])) ? (int) $field_validate[2] : 0; if ((!$day || !$month || !$year) && !$field_data['field_required']) { @@ -587,7 +587,7 @@ class custom_profile $value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview); - if (!isset($this->options_lang[$profile_row['field_id']]) || !sizeof($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']])) + if (!isset($this->options_lang[$profile_row['field_id']]) || !isset($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]) || !sizeof($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']])) { $this->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], FIELD_DROPDOWN, $preview); } @@ -774,9 +774,9 @@ class custom_profile_admin extends custom_profile global $user; $options = array( - 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => ''), - 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => ''), - 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => ''), + 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => ''), + 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => ''), + 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => ''), 3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '') ); @@ -788,9 +788,9 @@ class custom_profile_admin extends custom_profile global $user; $options = array( - 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '
[ ' . $user->lang['ROWS'] . ' ]
[ ' . $user->lang['COLUMNS'] . ' ]
'), - 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => ''), - 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => ''), + 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => ' ' . $user->lang['ROWS'] . '
' . $user->lang['COLUMNS'] . ' '), + 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => ''), + 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => ''), 3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '') ); @@ -802,10 +802,10 @@ class custom_profile_admin extends custom_profile global $user; $options = array( - 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => ''), - 1 => array('TITLE' => $user->lang['MIN_FIELD_NUMBER'], 'FIELD' => ''), - 2 => array('TITLE' => $user->lang['MAX_FIELD_NUMBER'], 'FIELD' => ''), - 3 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => '') + 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => ''), + 1 => array('TITLE' => $user->lang['MIN_FIELD_NUMBER'], 'FIELD' => ''), + 2 => array('TITLE' => $user->lang['MAX_FIELD_NUMBER'], 'FIELD' => ''), + 3 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => '') ); return $options; @@ -888,7 +888,7 @@ class custom_profile_admin extends custom_profile ); $options = array( - 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->generate_date($profile_row, true) . '
vars['field_default_value'] == 'now') ? ' checked="checked"' : '') . ' />  ' . $user->lang['ALWAYS_TODAY']) + 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->generate_date($profile_row, true) . '
vars['field_default_value'] == 'now') ? ' checked="checked"' : '') . ' />  ' . $user->lang['ALWAYS_TODAY']) ); return $options; -- cgit v1.2.1