Changeset 702 for trunk/forum/includes/acp/acp_profile.php
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/includes/acp/acp_profile.php
r400 r702 3 3 * 4 4 * @package acp 5 * @version $Id : acp_profile.php 9127 2008-11-26 19:58:35Z acydburn$5 * @version $Id$ 6 6 * @copyright (c) 2005 phpBB Group 7 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 370 370 'field_no_view' => 0, 371 371 'field_show_on_reg' => 0, 372 'field_show_on_vt' => 0, 372 373 'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)), 373 374 'lang_explain' => '', … … 380 381 // $exclude contains the data we gather in each step 381 382 $exclude = array( 382 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_ required', 'field_hide', 'field_show_profile', 'field_no_view'),383 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_hide', 'field_show_profile', 'field_no_view'), 383 384 2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'), 384 385 3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options') … … 406 407 'field_required', 407 408 'field_show_on_reg', 409 'field_show_on_vt', 408 410 'field_show_profile', 409 411 'field_hide', … … 508 510 $var = request_var('field_default_value', 0); 509 511 }*/ 512 else if ($field_type == FIELD_INT && $key == 'field_default_value') 513 { 514 // Permit an empty string 515 if (request_var('field_default_value', '') === '') 516 { 517 $var = ''; 518 } 519 } 510 520 511 521 $cp->vars[$key] = $var; … … 722 732 'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false, 723 733 'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false, 734 'S_SHOW_ON_VT' => ($cp->vars['field_show_on_vt']) ? true : false, 724 735 'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false, 725 736 'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false, … … 923 934 case FIELD_TEXT: 924 935 case FIELD_STRING: 925 if ( $cp->vars['lang_default_value'])936 if (strlen($cp->vars['lang_default_value'])) 926 937 { 927 938 $options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text'; … … 1037 1048 'field_required' => $cp->vars['field_required'], 1038 1049 'field_show_on_reg' => $cp->vars['field_show_on_reg'], 1050 'field_show_on_vt' => $cp->vars['field_show_on_vt'], 1039 1051 'field_hide' => $cp->vars['field_hide'], 1040 1052 'field_show_profile' => $cp->vars['field_show_profile'], … … 1540 1552 1541 1553 // We are defining the biggest common value, because of the possibility to edit the min/max values of each field. 1542 $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD \"$field_ident\" ";1554 $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" '; 1543 1555 1544 1556 switch ($field_type)
Note:
See TracChangeset
for help on using the changeset viewer.