diff options
author | Saeed Hubaishan <saeed@hubaishan.com> | 2015-11-29 10:51:19 +0300 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-01-07 17:36:02 +0100 |
commit | 678ca5dcdc27f2df10c6042ce74d08f4196d5a02 (patch) | |
tree | 631d7aee240afe38f8ce7a3027d7f6b12d946650 /phpBB | |
parent | a7058d968ff2e4b4cb4b32fb3f7284bd1a539c93 (diff) | |
download | forums-678ca5dcdc27f2df10c6042ce74d08f4196d5a02.tar forums-678ca5dcdc27f2df10c6042ce74d08f4196d5a02.tar.gz forums-678ca5dcdc27f2df10c6042ce74d08f4196d5a02.tar.bz2 forums-678ca5dcdc27f2df10c6042ce74d08f4196d5a02.tar.xz forums-678ca5dcdc27f2df10c6042ce74d08f4196d5a02.zip |
[ticket/13180] Increase dateformat field size
[ticket/13180] Increase dateformat field size
change field size to 64 in these files
add new migration file to update the database schema
PHPBB3-13180
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/style/acp_users_prefs.html | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php | 36 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_prefs_personal.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/ucp_prefs_personal.html | 2 |
6 files changed, 41 insertions, 5 deletions
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html index 14715f59e4..61904adc23 100644 --- a/phpBB/adm/style/acp_users_prefs.html +++ b/phpBB/adm/style/acp_users_prefs.html @@ -52,7 +52,7 @@ <dl> <dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt> <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd> - <dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd> + <dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="64" /></div></dd> </dl> <!-- EVENT acp_users_prefs_personal_append --> </fieldset> diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index aa4470fd0e..4c94b99b0d 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1587,7 +1587,7 @@ class acp_users if ($submit) { $error = validate_data($data, array( - 'dateformat' => array('string', false, 1, 30), + 'dateformat' => array('string', false, 1, 64), 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'), 'tz' => array('timezone'), diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 3c274b53c7..4516525bdf 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -86,7 +86,7 @@ class ucp_prefs } $error = array_merge(validate_data($data, array( - 'dateformat' => array('string', false, 1, 30), + 'dateformat' => array('string', false, 1, 64), 'lang' => array('language_iso_name'), 'tz' => array('timezone'), )), $error); diff --git a/phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php b/phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php new file mode 100644 index 0000000000..d2dfeff728 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php @@ -0,0 +1,36 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class increase_size_of_dateformat extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v31x\v316', + ); + } + + public function update_schema() + { + return array( + 'change_columns' => array( + $this->table_prefix . 'users' => array( + 'user_dateformat' => array('VCHAR:64', 'd M Y H:i'), + ), + ), + ); + } + +} diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index c8b028f83a..4cd9f6655b 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -70,7 +70,7 @@ {S_DATEFORMAT_OPTIONS} </select> </dd> - <dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="inputbox narrow" style="margin-top: 3px;" /></dd> + <dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="64" class="inputbox narrow" style="margin-top: 3px;" /></dd> </dl> <!-- EVENT ucp_prefs_personal_append --> </fieldset> diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html index 1c76e3226d..0dd50b8fa2 100644 --- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html +++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html @@ -59,7 +59,7 @@ <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }"> {S_DATEFORMAT_OPTIONS} </select> - <div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div> + <div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="64" class="post" style="margin-top: 3px;" /></div> </td> </tr> <!-- EVENT ucp_prefs_personal_append --> |