mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[feature/save-post-on-report] Changed the name of the column
The name of the column was changed from reported_post AND reported_text to reported_post_text. This change was made by request PHPBB3-10600
This commit is contained in:
parent
6f5c0dddfc
commit
18373035c3
11 changed files with 16 additions and 16 deletions
|
@ -1528,7 +1528,7 @@ function get_schema_struct()
|
|||
'report_closed' => array('BOOL', 0),
|
||||
'report_time' => array('TIMESTAMP', 0),
|
||||
'report_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post' => array('MTEXT_UNI', ''),
|
||||
'reported_post_text' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'report_id',
|
||||
'KEYS' => array(
|
||||
|
|
|
@ -71,7 +71,7 @@ class mcp_reports
|
|||
// closed reports are accessed by report id
|
||||
$report_id = request_var('r', 0);
|
||||
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
|
||||
AND rr.reason_id = r.reason_id
|
||||
|
@ -226,7 +226,7 @@ class mcp_reports
|
|||
'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']),
|
||||
'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']),
|
||||
|
||||
'POST_PREVIEW' => $report['reported_text'],
|
||||
'POST_PREVIEW' => $report['reported_post_text'],
|
||||
'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'],
|
||||
'POST_DATE' => $user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
|
|
|
@ -1089,7 +1089,7 @@ function database_update_info()
|
|||
'field_show_on_pm' => array('BOOL', 0),
|
||||
),
|
||||
REPORTS_TABLE => array(
|
||||
'reported_text' => array('TEXT', ''),
|
||||
'reported_post_text' => array('TEXT', ''),
|
||||
),
|
||||
),
|
||||
'change_columns' => array(
|
||||
|
|
|
@ -910,7 +910,7 @@ CREATE TABLE phpbb_reports (
|
|||
report_closed INTEGER DEFAULT 0 NOT NULL,
|
||||
report_time INTEGER DEFAULT 0 NOT NULL,
|
||||
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||
reported_post BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
|
||||
|
|
|
@ -1109,7 +1109,7 @@ CREATE TABLE [phpbb_reports] (
|
|||
[report_closed] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_text] [text] DEFAULT ('') NOT NULL ,
|
||||
[reported_post] [text] DEFAULT ('') NOT NULL
|
||||
[reported_post_text] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
|
|
@ -647,7 +647,7 @@ CREATE TABLE phpbb_reports (
|
|||
report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
report_text mediumblob NOT NULL,
|
||||
reported_post mediumblob NOT NULL,
|
||||
reported_post_text mediumblob NOT NULL,
|
||||
PRIMARY KEY (report_id),
|
||||
KEY post_id (post_id),
|
||||
KEY pm_id (pm_id)
|
||||
|
|
|
@ -647,7 +647,7 @@ CREATE TABLE phpbb_reports (
|
|||
report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
report_text mediumtext NOT NULL,
|
||||
reported_post mediumtext NOT NULL,
|
||||
reported_post_text mediumtext NOT NULL,
|
||||
PRIMARY KEY (report_id),
|
||||
KEY post_id (post_id),
|
||||
KEY pm_id (pm_id)
|
||||
|
|
|
@ -1214,7 +1214,7 @@ CREATE TABLE phpbb_reports (
|
|||
report_closed number(1) DEFAULT '0' NOT NULL,
|
||||
report_time number(11) DEFAULT '0' NOT NULL,
|
||||
report_text clob DEFAULT '' ,
|
||||
reported_post clob DEFAULT '' ,
|
||||
reported_post_text clob DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
|
||||
)
|
||||
/
|
||||
|
|
|
@ -853,7 +853,7 @@ CREATE TABLE phpbb_reports (
|
|||
report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0),
|
||||
report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
|
||||
report_text TEXT DEFAULT '' NOT NULL,
|
||||
reported_post TEXT DEFAULT '' NOT NULL,
|
||||
reported_post_text TEXT DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (report_id)
|
||||
);
|
||||
|
||||
|
|
|
@ -628,7 +628,7 @@ CREATE TABLE phpbb_reports (
|
|||
report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
report_text mediumtext(16777215) NOT NULL DEFAULT '',
|
||||
reported_post mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
reported_post_text mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
|
||||
|
|
|
@ -71,9 +71,9 @@ if ($post_id)
|
|||
trigger_error('POST_NOT_EXIST');
|
||||
}
|
||||
|
||||
$forum_id = (int) $report_data['forum_id'];
|
||||
$topic_id = (int) $report_data['topic_id'];
|
||||
$reported_text = $report_data['post_text'];
|
||||
$forum_id = (int) $report_data['forum_id'];
|
||||
$topic_id = (int) $report_data['topic_id'];
|
||||
$reported_post_text = $report_data['post_text'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
|
@ -132,7 +132,7 @@ else
|
|||
trigger_error($message);
|
||||
}
|
||||
|
||||
$reported_text = $report_data['message_text'];
|
||||
$reported_post_text = $report_data['message_text'];
|
||||
}
|
||||
|
||||
// Submit report?
|
||||
|
@ -159,7 +159,7 @@ if ($submit && $reason_id)
|
|||
'report_closed' => 0,
|
||||
'report_time' => (int) time(),
|
||||
'report_text' => (string) $report_text,
|
||||
'reported_text' => $reported_text,
|
||||
'reported_post_text' => $reported_post_text,
|
||||
);
|
||||
|
||||
$sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
|
|
Loading…
Add table
Reference in a new issue