mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 04:04:12 +02:00
Merge remote-tracking branch 'remotes/phpbb/develop' into feature/softdelete-merge-develop
# By Oleg Pudeyev (45) and others # Via Oleg Pudeyev (42) and others * remotes/phpbb/develop: (289 commits) [ticket/10865] Use code tags for install/database_update.php. [ticket/10865] Should have been a slash. [ticket/10780] Use L_COLON on LDAP page. [ticket/10780] Use L_COLON on search backend ACP pages. [ticket/10780] Use L_COLON for "download all attachments". [ticket/10780] Use colon from language in ucp_pm_compose.php where possible. [ticket/10780] Replace colons in phpBB/adm/style/acp_ext_details.html. [ticket/10780] Replace colon usage in adm template output with {L_COLON} [ticket/10780] Replace colon usage in template output with {L_COLON} [ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2) [develop-olympus] [ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2) [ticket/10172] Show prosilver birthday list even if there are no birthdays. [ticket/11050] make all properties protected in all search backends [ticket/11050] get_common_words() returns empty array for sphinx [ticket/11050] fix tidied search query docblock language [ticket/11050] fix min/max length docblock language [ticket/11050] multi sentences separated by period in docblocks [ticket/11050] fix separated spelling in docblock [ticket/11050] fix split words doc block language [ticket/11050] remove class word from docblocks ... Conflicts: phpBB/install/database_update.php phpBB/install/schemas/mssql_schema.sql phpBB/language/en/acp/permissions_phpbb.php phpBB/styles/prosilver/template/posting_editor.html
This commit is contained in:
@@ -50,6 +50,41 @@ if ($mode == 'delete' && (($confirm && !$request->is_set_post('delete_permanent'
|
||||
$error = $post_data = array();
|
||||
$current_time = time();
|
||||
|
||||
/**
|
||||
* This event allows you to alter the above parameters, such as submit and mode
|
||||
*
|
||||
* Note: $refresh must be true to retain previously submitted form data.
|
||||
*
|
||||
* Note: The template class will not work properly until $user->setup() is
|
||||
* called, and it has not been called yet. Extensions requiring template
|
||||
* assignments should use an event that comes later in this file.
|
||||
*
|
||||
* @event core.modify_posting_parameters
|
||||
* @var int post_id ID of the post
|
||||
* @var int topic_id ID of the topic
|
||||
* @var int forum_id ID of the forum
|
||||
* @var int draft_id ID of the draft
|
||||
* @var int lastclick Timestamp of when the form was last loaded
|
||||
* @var bool submit Whether or not the form has been submitted
|
||||
* @var bool preview Whether or not the post is being previewed
|
||||
* @var bool save Whether or not a draft is being saved
|
||||
* @var bool load Whether or not a draft is being loaded
|
||||
* @var bool delete Whether or not the post is being deleted
|
||||
* @var bool cancel Whether or not to cancel the form (returns to
|
||||
* viewtopic or viewforum depending on if the user
|
||||
* is posting a new topic or editing a post)
|
||||
* @var bool refresh Whether or not to retain previously submitted data
|
||||
* @var string mode What action to take if the form has been sumitted
|
||||
* post|reply|quote|edit|delete|bump|smilies|popup
|
||||
* @var array error Any error strings; a non-empty array aborts
|
||||
* form submission.
|
||||
* NOTE: Should be actual language strings, NOT
|
||||
* language keys.
|
||||
* @since 3.1-A1
|
||||
*/
|
||||
$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick', 'submit', 'preview', 'save', 'load', 'delete', 'cancel', 'refresh', 'mode', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars)));
|
||||
|
||||
// Was cancel pressed? If so then redirect to the appropriate page
|
||||
if ($cancel || ($current_time - $lastclick < 2 && $submit))
|
||||
{
|
||||
@@ -1419,7 +1454,7 @@ $template->assign_vars(array(
|
||||
'POST_DATE' => ($post_data['post_time']) ? $user->format_date($post_data['post_time']) : '',
|
||||
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'TOPIC_TIME_LIMIT' => (int) $post_data['topic_time_limit'],
|
||||
'EDIT_REASON' => $post_data['post_edit_reason'],
|
||||
'EDIT_REASON' => $request->variable('edit_reason', ''),
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"),
|
||||
'U_VIEW_TOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") : '',
|
||||
'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup"),
|
||||
@@ -1465,6 +1500,14 @@ $template->assign_vars(array(
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
);
|
||||
|
||||
/**
|
||||
* This event allows you to modify template variables for the posting screen
|
||||
*
|
||||
* @event core.posting_modify_template_vars
|
||||
* @since 3.1-A1
|
||||
*/
|
||||
$phpbb_dispatcher->trigger_event('core.posting_modify_template_vars');
|
||||
|
||||
// Build custom bbcodes array
|
||||
display_custom_bbcodes();
|
||||
|
||||
|
Reference in New Issue
Block a user