mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 02:48:56 +00:00
[feature/save-post-on-report] Saves the post reported when a report is creat
A problem when creating a report is that the report may be made and then the post changed. After the changes, if the report is seen the message it shows may not be correct to be reported. With these changes, when a report is created the system copies the post that was reported and shows it in the report details in the MCP PHPBB3-10600
This commit is contained in:
parent
95b5109c62
commit
c241a4a2b4
9 changed files with 12 additions and 3 deletions
|
@ -1528,6 +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', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'report_id',
|
||||
'KEYS' => array(
|
||||
|
|
|
@ -909,7 +909,8 @@ CREATE TABLE phpbb_reports (
|
|||
user_notify INTEGER DEFAULT 0 NOT NULL,
|
||||
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
|
||||
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||
reported_post BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
|
||||
|
|
|
@ -1108,7 +1108,8 @@ CREATE TABLE [phpbb_reports] (
|
|||
[user_notify] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_closed] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_text] [text] DEFAULT ('') NOT NULL
|
||||
[report_text] [text] DEFAULT ('') NOT NULL ,
|
||||
[reported_post] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
|
|
@ -647,6 +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,
|
||||
PRIMARY KEY (report_id),
|
||||
KEY post_id (post_id),
|
||||
KEY pm_id (pm_id)
|
||||
|
|
|
@ -647,6 +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,
|
||||
PRIMARY KEY (report_id),
|
||||
KEY post_id (post_id),
|
||||
KEY pm_id (pm_id)
|
||||
|
|
|
@ -1214,6 +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 '' ,
|
||||
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
|
||||
)
|
||||
/
|
||||
|
|
|
@ -853,6 +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,
|
||||
PRIMARY KEY (report_id)
|
||||
);
|
||||
|
||||
|
|
|
@ -627,7 +627,8 @@ CREATE TABLE phpbb_reports (
|
|||
user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
report_text mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
report_text mediumtext(16777215) NOT NULL DEFAULT '',
|
||||
reported_post mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<table width="100%" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- IF topic_review_row.POST_ID == REPORTED_POST_ID --><span class="postreported">{REPORTED_IMG}</span><!-- ENDIF -->
|
||||
<div class="postbody">{topic_review_row.MESSAGE}</div>
|
||||
|
||||
<!-- IF topic_review_row.S_HAS_ATTACHMENTS -->
|
||||
|
|
Loading…
Add table
Reference in a new issue