1. 07 Apr, 2006 1 commit
  2. 04 Apr, 2006 2 commits
  3. 03 Apr, 2006 1 commit
  4. 02 Apr, 2006 1 commit
  5. 14 Mar, 2006 1 commit
  6. 05 Mar, 2006 1 commit
  7. 04 Mar, 2006 2 commits
    • Dries's avatar
      - Patch #52265 by Zen: converted filter.module to file API: · 650f22bc
      Dries authored
          * Converts filter.module to the fapi model (besides filter_admin_overview which has already been done.)
          * On the format edit screen, updates to the roles fieldset were being mangled with the previous code. The previous code relied on only checked checkboxes being returned. Fapi for some reason decides to insert non-checked items as well with values 0.
          * Makes the name field a UNIQUE field. DB and update patches included. Having a duplicate format name completely b0rks things.
          * Adds check_plain to the format name in admin_overview.
          * Removes unnecessary #type => 'markup'.
          * Moves hook_menu to below hook_help.
          * drupal_goto -> return.
      650f22bc
    • Dries's avatar
      - Patch #52341 by m3avrck: corrected phpdoc. · ff5f9c9c
      Dries authored
      ff5f9c9c
  8. 01 Mar, 2006 1 commit
  9. 27 Feb, 2006 1 commit
  10. 23 Feb, 2006 1 commit
  11. 21 Feb, 2006 1 commit
  12. 16 Feb, 2006 1 commit
  13. 25 Jan, 2006 2 commits
  14. 20 Jan, 2006 1 commit
    • Dries's avatar
      - Patch #45530 by Morbus: filter_form shouldn't default to #weight 0 · 8c02d4ec
      Dries authored
      When a form element doesn't specify a #weight, it is assumed internally as #weight 0. However, to ensure that our form elements display visually *as they were defined in the array* we, in form_builder, count the number of elements, divide by 1000, and set that as the weight:
      
      # Assign a decimal placeholder weight to preserve original array order
      if (!isset($form[$key]['#weight'])) {
        $form[$key]['#weight'] = $count/1000;
      }
      
      The above code will set the #weights of elements that have not defined a weight to something like 0 (first element in array definition), 0.001, 0.002, and so on. However, anytime a form element *explicitly* defines a #weight of 0, that #weight is kept at exactly 0, which would cause that form element to appear BEFORE the elements that didn't have a #weight defined (and thus received a #weight such as 0.002).
      
      Consider the following pseudo example:
      
      $form['game_title'] = array(
          '#type' => 'textfield',
          ...
          );
      $form['game_description'] = array(
          '#type' => 'textarea',
          ...
          );
      $form['game_format'] = filter_form(variable_get('game_format', NULL));
      return $form;
      
      Here, we're not definiing weights on our two textfields. We then add an filter_form. The second parameter of the filter_form is $weight, which defaults to 0. After this $form hits form_builder, we have weights 0 (game_title), 0.001 (game_description), and 0 (filter_form) respectively. This is then sorted by weight, which causes filter_form (the third element in the array) to appear BEFORE game_description (0 is lighter than 0.001).
      
      The short lesson is: explicitly defining #weight 0 for a form element is probably a bad idea. This patch changes the default #weight of filter_form to NULL, instead of 0, and also removes any other explicit setting of #weight to 0 in core.
      8c02d4ec
  15. 15 Jan, 2006 1 commit
  16. 02 Jan, 2006 1 commit
  17. 31 Dec, 2005 1 commit
  18. 28 Dec, 2005 1 commit
  19. 19 Dec, 2005 1 commit
  20. 15 Dec, 2005 1 commit
  21. 14 Dec, 2005 2 commits
  22. 10 Dec, 2005 1 commit
  23. 08 Dec, 2005 1 commit
  24. 05 Dec, 2005 1 commit
  25. 03 Dec, 2005 1 commit
  26. 02 Dec, 2005 1 commit
  27. 30 Nov, 2005 3 commits
  28. 29 Nov, 2005 1 commit
  29. 23 Nov, 2005 1 commit
  30. 12 Nov, 2005 1 commit
  31. 10 Nov, 2005 1 commit
  32. 09 Nov, 2005 1 commit
  33. 01 Nov, 2005 1 commit
  34. 31 Oct, 2005 1 commit