Conversation
rebased to 3.3.x PHPBB3-16193
Fix indentation PHPBB3-16193
Fix indentation PHPBB3-16193
|
I have assigned this the 4.0 label as I don't think we'll be able to merge this refactoring into 3.3 due to the rather short time we have before its RC and stable release. |
Does "4.0" mean 4.0, or something after 3.3.0? |
|
Will be great if it can happen for 3.3 😇 seems like a small but very good feature |
|
Seeing that font awesome was merged into 3.3, any chance to see this as well? |
|
I'll see if I can review this aswell. |
|
I should be able to fix the conflicts in a day or two... This PR is currently against the 3.3.x branch. |
ghost
left a comment
There was a problem hiding this comment.
This too is a rather large, large PR, that will require a lot of testing on local environments too.
A lot of new functionalities and changes to existing ones..
Not a big fan of how drafts will be handled, where they take presedence over a lot of other common actions, eg: if ($visibility == ITEM_DRAFT) { ... } else { // Everything else, like a regular post }. Not to mention the amount of additional nested conditionals.
| 'S_FRIEND' => ($row['friend']) ? true : false, | ||
| 'S_IGNORE_POST' => ($row['foe']) ? true : false, | ||
| 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '', | ||
| 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '', |
| else if ($mode == 'edit') | ||
| { | ||
| $post_mode = ($data_ary['topic_posts_approved'] + $data_ary['topic_posts_unapproved'] + $data_ary['topic_posts_softdeleted'] == 1) ? 'edit_topic' : (($data_ary['topic_first_post_id'] == $data_ary['post_id']) ? 'edit_first_post' : (($data_ary['topic_last_post_id'] == $data_ary['post_id']) ? 'edit_last_post' : 'edit')); | ||
| $post_mode = ($data_ary['topic_posts_approved'] + $data_ary['topic_posts_unapproved'] + $data_ary['topic_posts_softdeleted'] == 1) ? 'edit_topic' : (($data_ary['topic_first_post_id'] == $data_ary['post_id']) ? 'edit_first_post' : (($data_ary['topic_last_post_id'] == $data_ary['post_id']) ? 'edit_last_post' : 'edit')); |
|
|
||
| $data_ary['topic_visibility'] = $topic_row['topic_visibility']; | ||
| $data_ary['post_visibility'] = $topic_row['post_visibility']; | ||
| $post_visibility = ITEM_DRAFT; |
There was a problem hiding this comment.
What's the point of this variable as it is immediately overwritten by ITEM_APPROVED?
| { | ||
| $post_visibility = (in_array((int) $data_ary['force_visibility'], array(ITEM_APPROVED, ITEM_UNAPPROVED, ITEM_DELETED, ITEM_REAPPROVE))) ? (int) $data_ary['force_visibility'] : $post_visibility; | ||
| } | ||
| } |
There was a problem hiding this comment.
Everything above is not properly indented.
| // Delete draft if post was loaded... | ||
| $draft_id = $request->variable('draft_loaded', 0); | ||
| if ($draft_id) | ||
| if ($data_ary['post_visibility'] != ITEM_DRAFT) |
| $user->setup('posting'); | ||
| trigger_error('NO_POST'); | ||
| } | ||
| if ($mode == 'soft_delete' && $post_data['post_visibility'] == ITEM_DRAFT) |
| // Egosearch and draftsearch are author searches | ||
| case 'draftsearch': | ||
| $target_visibility = ITEM_DRAFT; | ||
| // deliberate drop-through |
| $posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false; | ||
| $topic_deleted = $row['topic_visibility'] == ITEM_DELETED; | ||
| $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : ''; | ||
| $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : ''; |
| @@ -1,6 +1,4 @@ | |||
| <fieldset class="fields1"> | |||
| <!-- IF not S_SHOW_DRAFTS --> | |||
There was a problem hiding this comment.
This entire file now has incorrect indentations.
| <dt class="author">{L_POST_BY_AUTHOR} <!-- EVENT search_results_post_author_username_prepend -->{searchresults.POST_AUTHOR_FULL}<!-- EVENT search_results_post_author_username_append --></dt> | ||
| <dd class="search-result-date">{searchresults.POST_DATE}</dd> | ||
| <dd>{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd> | ||
| <!-- IF searchresults.TOPIC_REPLIES >= 0 --> |
There was a problem hiding this comment.
Wrong indentation and should use twig syntax for newly added template code.
The twig syntax also applies to a lot more files.
Merge branch '3.3.x' of https://github.com/phpbb/phpbb into ticket/16193 PHPBB3-16193
Merge branch '3.3.x' of https://github.com/phpbb/phpbb into ticket/16193 PHPBB3-16193
rebased to 3.3.x
PHPBB3-16193
Checklist:
Tracker ticket (set the ticket ID to your ticket ID):
https://tracker.phpbb.com/browse/PHPBB3-16193