mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@7826 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c0f52d91ef
commit
d2451b9065
12 changed files with 41 additions and 22 deletions
|
@ -60,11 +60,11 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="banreason">{L_BAN_REASON}:</label></dt>
|
<dt><label for="banreason">{L_BAN_REASON}:</label></dt>
|
||||||
<dd><input name="banreason" type="text" class="text medium" maxlength="3000" id="banreason" /></dd>
|
<dd><input name="banreason" type="text" class="text medium" maxlength="255" id="banreason" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
||||||
<dd><input name="bangivereason" type="text" class="text medium" maxlength="3000" id="bangivereason" /></dd>
|
<dd><input name="bangivereason" type="text" class="text medium" maxlength="255" id="bangivereason" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<p class="submit-buttons">
|
<p class="submit-buttons">
|
||||||
|
|
|
@ -886,8 +886,8 @@ function get_schema_struct()
|
||||||
'ban_start' => array('TIMESTAMP', 0),
|
'ban_start' => array('TIMESTAMP', 0),
|
||||||
'ban_end' => array('TIMESTAMP', 0),
|
'ban_end' => array('TIMESTAMP', 0),
|
||||||
'ban_exclude' => array('BOOL', 0),
|
'ban_exclude' => array('BOOL', 0),
|
||||||
'ban_reason' => array('STEXT', ''),
|
'ban_reason' => array('VCHAR_UNI', ''),
|
||||||
'ban_give_reason' => array('STEXT', ''),
|
'ban_give_reason' => array('VCHAR_UNI', ''),
|
||||||
),
|
),
|
||||||
'PRIMARY_KEY' => 'ban_id',
|
'PRIMARY_KEY' => 'ban_id',
|
||||||
'KEYS' => array(
|
'KEYS' => array(
|
||||||
|
|
|
@ -216,7 +216,7 @@ p a {
|
||||||
<li>[Fix] Minor language and style fixes (Bugs #12235, #12493, #11949)</li>
|
<li>[Fix] Minor language and style fixes (Bugs #12235, #12493, #11949)</li>
|
||||||
<li>[Feature] Added backlinks to mcp_report (Bug #12905)</li>
|
<li>[Feature] Added backlinks to mcp_report (Bug #12905)</li>
|
||||||
<li>[Fix] Only check usernames in guest posts upon edit (Bug #11349)</li>
|
<li>[Fix] Only check usernames in guest posts upon edit (Bug #11349)</li>
|
||||||
|
<li>[Fix] Added proper unicode support to ban reasons (Bug #12947)</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -332,6 +332,16 @@ $database_update_info = array(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// Changes from 3.0.RC2 to the next version
|
||||||
|
'3.0.RC2' => array(
|
||||||
|
// Remove the following keys
|
||||||
|
'change_columns' => array(
|
||||||
|
BANLIST_TABLE => array(
|
||||||
|
'ban_reason' => array('VCHAR_UNI', ''),
|
||||||
|
'ban_give_reason' => array('VCHAR_UNI', ''),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Determine mapping database type
|
// Determine mapping database type
|
||||||
|
@ -1406,7 +1416,16 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'postgres':
|
case 'postgres':
|
||||||
$sql = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET ' . $column_data['column_type_sql'];
|
$default_pos = strpos($column_data['column_type_sql'], ' DEFAULT');
|
||||||
|
|
||||||
|
if ($default_pos === false)
|
||||||
|
{
|
||||||
|
$sql = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' TYPE ' . $column_data['column_type_sql'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' TYPE ' . substr($column_data['column_type_sql'], 0, $default_pos) . ', ALTER COLUMN ' . $column_name . ' SET ' . substr($column_data['column_type_sql'], $default_pos + 1);
|
||||||
|
}
|
||||||
_sql($sql, $errored, $error_ary);
|
_sql($sql, $errored, $error_ary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -136,8 +136,8 @@ CREATE TABLE phpbb_banlist (
|
||||||
ban_start INTEGER DEFAULT 0 NOT NULL,
|
ban_start INTEGER DEFAULT 0 NOT NULL,
|
||||||
ban_end INTEGER DEFAULT 0 NOT NULL,
|
ban_end INTEGER DEFAULT 0 NOT NULL,
|
||||||
ban_exclude INTEGER DEFAULT 0 NOT NULL,
|
ban_exclude INTEGER DEFAULT 0 NOT NULL,
|
||||||
ban_reason BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
|
ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||||
ban_give_reason BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
|
ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
|
||||||
);;
|
);;
|
||||||
|
|
||||||
ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);;
|
ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);;
|
||||||
|
|
|
@ -178,8 +178,8 @@ CREATE TABLE [phpbb_banlist] (
|
||||||
[ban_start] [int] DEFAULT (0) NOT NULL ,
|
[ban_start] [int] DEFAULT (0) NOT NULL ,
|
||||||
[ban_end] [int] DEFAULT (0) NOT NULL ,
|
[ban_end] [int] DEFAULT (0) NOT NULL ,
|
||||||
[ban_exclude] [int] DEFAULT (0) NOT NULL ,
|
[ban_exclude] [int] DEFAULT (0) NOT NULL ,
|
||||||
[ban_reason] [varchar] (3000) DEFAULT ('') NOT NULL ,
|
[ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
[ban_give_reason] [varchar] (3000) DEFAULT ('') NOT NULL
|
[ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL
|
||||||
) ON [PRIMARY]
|
) ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,8 @@ CREATE TABLE phpbb_banlist (
|
||||||
ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
ban_reason text NOT NULL,
|
ban_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
ban_give_reason text NOT NULL,
|
ban_give_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY (ban_id),
|
PRIMARY KEY (ban_id),
|
||||||
KEY ban_end (ban_end),
|
KEY ban_end (ban_end),
|
||||||
KEY ban_user (ban_userid, ban_exclude),
|
KEY ban_user (ban_userid, ban_exclude),
|
||||||
|
|
|
@ -220,8 +220,8 @@ CREATE TABLE phpbb_banlist (
|
||||||
ban_start number(11) DEFAULT '0' NOT NULL,
|
ban_start number(11) DEFAULT '0' NOT NULL,
|
||||||
ban_end number(11) DEFAULT '0' NOT NULL,
|
ban_end number(11) DEFAULT '0' NOT NULL,
|
||||||
ban_exclude number(1) DEFAULT '0' NOT NULL,
|
ban_exclude number(1) DEFAULT '0' NOT NULL,
|
||||||
ban_reason varchar2(3000) DEFAULT '' ,
|
ban_reason varchar2(765) DEFAULT '' ,
|
||||||
ban_give_reason varchar2(3000) DEFAULT '' ,
|
ban_give_reason varchar2(765) DEFAULT '' ,
|
||||||
CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
|
CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
|
|
|
@ -199,8 +199,8 @@ CREATE TABLE phpbb_banlist (
|
||||||
ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0),
|
ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0),
|
||||||
ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0),
|
ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0),
|
||||||
ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0),
|
ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0),
|
||||||
ban_reason varchar(3000) DEFAULT '' NOT NULL,
|
ban_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
ban_give_reason varchar(3000) DEFAULT '' NOT NULL,
|
ban_give_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY (ban_id)
|
PRIMARY KEY (ban_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,8 @@ CREATE TABLE phpbb_banlist (
|
||||||
ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
ban_reason text(65535) NOT NULL DEFAULT '',
|
ban_reason varchar(255) NOT NULL DEFAULT '',
|
||||||
ban_give_reason text(65535) NOT NULL DEFAULT ''
|
ban_give_reason varchar(255) NOT NULL DEFAULT ''
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
|
CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
|
||||||
|
|
|
@ -54,11 +54,11 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="banreason">{L_BAN_REASON}:</label></dt>
|
<dt><label for="banreason">{L_BAN_REASON}:</label></dt>
|
||||||
<dd><input name="banreason" id="banreason" type="text" class="inputbox" /></dd>
|
<dd><input name="banreason" id="banreason" type="text" class="inputbox" maxlength="255" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
||||||
<dd><input name="bangivereason" id="bangivereason" type="text" class="inputbox" /></dd>
|
<dd><input name="bangivereason" id="bangivereason" type="text" class="inputbox" maxlength="255" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -57,11 +57,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
|
<td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
|
||||||
<td class="row2"><input name="banreason" type="text" class="post" /></td>
|
<td class="row2"><input name="banreason" type="text" class="post" maxlength="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
|
<td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
|
||||||
<td class="row2"><input name="bangivereason" type="text" class="post" /></td>
|
<td class="row2"><input name="bangivereason" type="text" class="post" maxlength="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="2" align="center"><input type="submit" name="bansubmit" value="{L_SUBMIT}" class="btnmain" /> <input type="reset" value="{L_RESET}" class="btnlite" /> </td>
|
<td class="cat" colspan="2" align="center"><input type="submit" name="bansubmit" value="{L_SUBMIT}" class="btnmain" /> <input type="reset" value="{L_RESET}" class="btnlite" /> </td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue