Commit Graph

135 Commits (c27f564e07057b38fe1fb906b68e0e1ccfd9996b)

Author SHA1 Message Date
Dries Buytaert 7de41539df - Patch #77919 by chx, eaton, moshe, et al: enable programmaticaly submitted forms via the pull model. 2006-08-18 18:58:47 +00:00
Steven Wittens 81938a3cdc #76802: Introduce placeholder magic into t()
See: http://drupal.org/node/64279#t-placeholders
2006-08-18 12:17:00 +00:00
Dries Buytaert ce85b7c7f8 - Patch #74326 by Eaton, Royboy, chx, et al: building $node->body with arrays like FAPI for viewing.
Once again, we're paving the path for CCK in core ... :)
2006-08-10 15:42:33 +00:00
Dries Buytaert 729fa6c11b - Patch #77422 by timcn: corrected various paths in the documentation. 2006-08-07 15:04:16 +00:00
Neil Drumm cd430165d7 #73884 by RobRoy, various code cleanup. 2006-08-05 00:26:36 +00:00
Steven Wittens c556b4d6b1 - Make filter admin work after recent admin changes 2006-08-01 20:31:39 +00:00
Dries Buytaert b138793b68 - Patch #72079 by Earl et al: give Drupal an overall administration page ... :-) 2006-07-31 11:25:55 +00:00
Dries Buytaert 3a7b64ae03 - Patch #61893 by timnc: remove message_na(). 2006-07-29 17:56:41 +00:00
Neil Drumm 751a6979ef #73683 by keve, properly initialize an array. 2006-07-19 07:04:26 +00:00
Dries Buytaert e93f8be871 - Patch #72204 by nedjo: upper-cased all TRUE/FALSE/NULL constants. 2006-07-05 11:45:51 +00:00
Neil Drumm 451f44c4f0 #71772 by Bart Jansens, fix various php warnings 2006-07-02 20:06:31 +00:00
Neil Drumm 9cff02e91b #61802 by Zen, Double spaced sentences clean up 2006-05-07 00:08:36 +00:00
Neil Drumm a658867204 #61692 by Zen, Filter module: Missing t() 2006-05-04 09:50:35 +00:00
Dries Buytaert d071f99172 - Removing trailing whitespace. 2006-04-17 20:48:26 +00:00
Gerhard Killesreiter 67fa69fe0e #56947, fix filter link tips, patch by Dries Knapen 2006-04-14 13:45:50 +00:00
Steven Wittens 8fe5051360 #58317: Backport autop improvements from wordpress 2006-04-12 14:36:24 +00:00
Steven Wittens 390b681721 #57948: Fix header elements in filter_xss_admin 2006-04-09 16:13:30 +00:00
Steven Wittens 9794b5538e - #55898: Generic, permissive admin XSS/HTML filtering for mission/footer/...
- Clean up some raw output
2006-04-07 15:32:17 +00:00
Steven Wittens abf9cee792 #56947: Restore missing filter tips (drumm) 2006-04-04 01:07:42 +00:00
Steven Wittens 5e0ea8609b Oopsie 2006-04-04 00:32:52 +00:00
Steven Wittens da38e1b654 - Store correct format id instead of 0 for anonymous users (+ code cleanup) 2006-04-03 23:59:48 +00:00
Neil Drumm 767ed120d5 #41171 James Harvard & freso@freso.dk: Add ABBR & ACRONYM to HTML tips 2006-04-02 10:12:47 +00:00
Steven Wittens fe19714805 - theme_placeholder to theme('placeholder') 2006-03-14 15:15:46 +00:00
Neil Drumm 4b663a62af #52484 by chx: filter_form needs validation 2006-03-05 02:46:55 +00:00
Dries Buytaert 650f22bc7f - Patch #52265 by Zen: converted filter.module to file API:
* 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.
2006-03-04 18:12:10 +00:00
Dries Buytaert ff5f9c9ca3 - Patch #52341 by m3avrck: corrected phpdoc. 2006-03-04 17:51:34 +00:00
Dries Buytaert 26ba37823e - Patch #50982 by kuba: converted the admin filter overview page to the submit-model. 2006-03-01 09:01:34 +00:00
Gerhard Killesreiter 1091a2f059 #48710, incorrect list of roles that can use default input format, patch by RayZ 2006-02-27 14:24:54 +00:00
Steven Wittens 688197e8cd - #48997: Remove PHP notice from filter.module 2006-02-23 04:01:14 +00:00
Dries Buytaert 3603fe1bd8 - Patch #49912: www.drupal.org -> drupal.org. (Today's critical bugfix #5.) 2006-02-21 18:46:54 +00:00
Dries Buytaert dca43564df - Patch #49198 by Ber: improved documentation of filter-roles setting. 2006-02-16 15:36:31 +00:00
Steven Wittens 548e5d2b5f - #45742: XHTML slash fix. 2006-01-25 22:29:57 +00:00
Dries Buytaert f4f77fc851 - Patch #45742 by chx: fixed problem with closed tags being filtered out. 2006-01-25 19:20:28 +00:00
Dries Buytaert 8c02d4ec93 - Patch #45530 by Morbus: filter_form shouldn't default to #weight 0
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.
2006-01-20 09:04:34 +00:00
Steven Wittens 2e9bbda791 - #44772: {} -> [] (in anticipation of PHP de-deprecation) 2006-01-15 07:14:14 +00:00
Dries Buytaert 590e2d8e5f - Partial patch #43014 by wulff: added missing t() function to filter.module. 2006-01-02 10:01:03 +00:00
Steven Wittens 9ff2c1b3a8 - #42828: Auto-p destroys alphanumeric named entities like ½ 2005-12-31 04:01:38 +00:00
Steven Wittens afd8ccaf7e - #27230: Fix XHTML slash in XSS filter 2005-12-28 18:43:42 +00:00
Dries Buytaert eb412f7c7e - Patch #39179 by chx: improved validation of forms. 2005-12-19 14:30:53 +00:00
Dries Buytaert 922a46d281 - Patch #34920 by Morbus/webchick/tangent: fixed order of form fields. 2005-12-15 16:24:40 +00:00
Dries Buytaert 764f1177ef - Patch #40631 by Chris Johnson: is_array() slower than isset() or empty(). 2005-12-14 20:10:45 +00:00
Dries Buytaert d40ce21711 - Patch #40975 by chx: filter_format no longer supports multiple filtered areas. 2005-12-14 13:56:54 +00:00
Dries Buytaert fb9ff3baf9 - Patch #40628 by Jaza: added missing fieldset around filter options. 2005-12-10 19:35:13 +00:00
Dries Buytaert e6b78e287d - Patch #40351 by Richard/chx: filter_xss_bad_protocol too hungry. 2005-12-08 09:05:30 +00:00
Dries Buytaert 28fdb3975e - Patch #39778 by chx: obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick. 2005-12-05 09:11:33 +00:00
Dries Buytaert 75d2089fba - Patch #39155 by Alex/chx: #validate, #submit, #process consistency 2005-12-03 09:44:50 +00:00
Dries Buytaert 7bdd8b3718 - Patch #39605 by Alex: remove form_filter type. 2005-12-02 15:46:46 +00:00
Dries Buytaert 16bcdbda69 - Improved the protocol whitelist code. 2005-11-30 20:16:47 +00:00
Dries Buytaert a74ebcc87a - More fixes 2005-11-30 15:31:23 +00:00
Steven Wittens 0ff2db93dd - #39362: Fix code warnings in filter.module 2005-11-30 00:12:23 +00:00