Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Nov 2018 at 23:47 UTC
Updated:
29 Jan 2019 at 01:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jweowu commentedComment #3
jweowu commentedMost calls to
func_get_args()were already happening early. This patch addresses the remainder.Comment #4
damienmckennaThe change you made in views_revert_views() moves func_get_args() to later in the function?
Comment #5
jweowu commentedThe diff does make it look slightly odd, but that moves
$viewnames = _convert_csv_to_array(func_get_args());to the top of the function.function views_revert_views() { - $views = views_get_all_views(); - $i = 0; // The provided views names specified in the command. $viewnames = _convert_csv_to_array(func_get_args()); + $views = views_get_all_views(); + $i = 0;Comment #6
jweowu commentedIn the context of the reason behind this issue, it would also be entirely reasonable to change this to:
or, closer to the original code:
I'm happy to re-roll.
Comment #7
mustanggb commentedFor future clarity might be best to be consistent and go with a
$args = func_get_args();version.That said, I think DamienMcKenna just misread the patch file.
Comment #8
jweowu commentedComment #9
mustanggb commentedSeems pretty straight forward.
Comment #10
damienmckennaCommitted. Thanks!
Comment #12
damienmckennaComment #13
jweowu commentedDamien, could you re-review the change I made to views_ui.module ?
Re-reading the patch, I'm aware that the way I've reordered things means that
drupal_build_form($form_id, $form_state);is now called without the 'no_redirect' and 'rebuild_info' values which were previously in$form_statewhen this happened.I obviously thought this was ok at the time, and now I'm not so sure.
drupal_build_form()will triggerdrupal_rebuild_form()ifisset($_SESSION['batch_form_state']), so the sequence change no longer looks safe to me.Comment #14
damienmckennaGood catch, yes, best to put those back.
Comment #15
jweowu commentedHere's the follow-up patch.
5c44b7f1 was the commit which added the preceding patch.
The new patch restores views_ui.module to its previous state (
5c44b7f1^) except with (only) the code establishing$argsmoved.diff-views_ui-5c44b7f1^-15.txt shows the difference between the previous state of views_ui.module and this new patch. If you commit this patch and check
git diff 5c44b7f1^ views_ui.moduleyou ought to see the same.Comment #17
damienmckennaAwesome, thank you!