Ignore:
Timestamp:
Mar 31, 2010, 6:32:40 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Aktualizace fóra.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/includes/acp/acp_profile.php

    r400 r702  
    33*
    44* @package acp
    5 * @version $Id: acp_profile.php 9127 2008-11-26 19:58:35Z acydburn $
     5* @version $Id$
    66* @copyright (c) 2005 phpBB Group
    77* @license http://opensource.org/licenses/gpl-license.php GNU Public License
     
    370370                                                'field_no_view'         => 0,
    371371                                                'field_show_on_reg'     => 0,
     372                                                'field_show_on_vt'      => 0,
    372373                                                'lang_name'                     => utf8_normalize_nfc(request_var('field_ident', '', true)),
    373374                                                'lang_explain'          => '',
     
    380381                                // $exclude contains the data we gather in each step
    381382                                $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'),
    383384                                        2       => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'),
    384385                                        3       => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options')
     
    406407                                        'field_required',
    407408                                        'field_show_on_reg',
     409                                        'field_show_on_vt',
    408410                                        'field_show_profile',
    409411                                        'field_hide',
     
    508510                                                $var = request_var('field_default_value', 0);
    509511                                        }*/
     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                                        }
    510520
    511521                                        $cp->vars[$key] = $var;
     
    722732                                                        'S_FIELD_REQUIRED'      => ($cp->vars['field_required']) ? true : false,
    723733                                                        '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,
    724735                                                        'S_FIELD_HIDE'          => ($cp->vars['field_hide']) ? true : false,
    725736                                                        'S_SHOW_PROFILE'        => ($cp->vars['field_show_profile']) ? true : false,
     
    923934                        case FIELD_TEXT:
    924935                        case FIELD_STRING:
    925                                 if ($cp->vars['lang_default_value'])
     936                                if (strlen($cp->vars['lang_default_value']))
    926937                                {
    927938                                        $options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text';
     
    10371048                        'field_required'                => $cp->vars['field_required'],
    10381049                        'field_show_on_reg'             => $cp->vars['field_show_on_reg'],
     1050                        'field_show_on_vt'              => $cp->vars['field_show_on_vt'],
    10391051                        'field_hide'                    => $cp->vars['field_hide'],
    10401052                        'field_show_profile'    => $cp->vars['field_show_profile'],
     
    15401552
    15411553                                // 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) . '" ';
    15431555
    15441556                                switch ($field_type)
Note: See TracChangeset for help on using the changeset viewer.