Guest User

Untitled

a guest
Aug 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. diff --git a/sites/all/modules/contrib/dialog/dialog.module b/sites/all/modules/contrib/dialog/dialog.module
  2. --- a/sites/all/modules/contrib/dialog/dialog.module
  3. +++ b/sites/all/modules/contrib/dialog/dialog.module
  4. @@ -145,7 +145,16 @@
  5. $commands[] = ctools_ajax_command_settings($form_state['js settings']);
  6. }
  7.  
  8. - $commands[] = dialog_command_display($title, $output);
  9. + // refactor me please
  10. + $args = isset($form_state['args']) ? $form_state['args'] : array();
  11. + $options = NULL;
  12. + foreach ($args as $arg) {
  13. + if (is_array($arg) && array_key_exists('dialog_options', $arg)) {
  14. + $options = $arg['dialog_options'];
  15. + }
  16. + }
  17. +
  18. + $commands[] = dialog_command_display($title, $output, $options);
  19. return $commands;
  20. }
Add Comment
Please, Sign In to add comment