Commit Graph

364 Commits (6d0971ff4cb082a890e285f36361bd0717842217)

Author SHA1 Message Date
Dries Buytaert 02ae1ce670 - Many form_ functions called theme('form_element') with the wrong parameters!
- Fixed order of parameters in form_checkboxes() (plural).
2004-07-08 11:31:12 +00:00
Dries Buytaert fe2b3e7c00 - Patch by Steven and me: refactored the form handling of nodes. The node system is now using form_set_error() and friends like the rest of Drupal does. This makes for both a consistent user experience and consistent code. It simplifies the forms and validation code, however, it does change the node API slightly:
* The _validate hook and the _nodeapi('validate') hook of the node API (1) no longer take an 'error' parameter and (2) should no longer return an error array. To set an error, call form_set_error().

    * The _form hook of the node module no longer takes a form hook and should not worry about displaying errors. Ditto for _nodeapi('form_post') and _nodeapi('form_pre').
2004-07-04 16:50:02 +00:00
Dries Buytaert f3aa87122e - Textarea's did not have error handling support yet. 2004-07-04 06:19:41 +00:00
Dries Buytaert 9986cb36b5 - Patch #8973 by JonBob: Drupal contains many undefined variables and array indices, which makes PHP throw a lot of warnings when the reporting level is set to E_ALL. Things run fine with these warnings, but as a matter of code style if nothing else we should probably strive to avoid them. The attached fixes most of the more egregious offenders (about 95% of the warnings when I load /node on my test site). 2004-07-02 18:46:42 +00:00
Steven Wittens 6a00c7c2f2 - Preventing caching of page when status messages are present (needed for redirects after form submission to work properly)
- Double-quotes to Single-quotes
2004-06-28 20:00:53 +00:00
Dries Buytaert 77ec01f592 - Patch #8344 by Kjartan: drupal_http_request() did not always handle EOLs
correctly.
2004-06-21 20:14:41 +00:00
Dries Buytaert 090743bdba - Patch #8670 by asimmonds: more spelling fixes. 2004-06-21 20:05:37 +00:00
Dries Buytaert 54b77d6435 Tabs patch!
CHANGES
-------

 + Introduced tabs. First, we extended the menu system to support tabs. Next, a tab was added for every link that was (1) an administrative action other than the implicit 'view' (2) relevant to that particular page only. This is illustrated by the fact that all tabs are verbs and that clicking a page's tab leads you to a subpage of that page.

 + Flattened the administration menu. The tabs helped simplify the navigation menu as I could separate 'actions' from 'navigation'. In addition, I removed the 'administer > configuration'-menu, renamed 'blocks' to 'sidebars' which I hope is a bit more descriptive, and made a couple more changes. Earlier, we already renamed 'taxonomy' to 'categorization' and we move 'statistics' under 'logs'.

 + Grouped settings. All settings have been grouped under 'administer > settings'.

TODO
----

 + Update core themes: only Xtemplate default supports tabs and even those look ugly.  Need help.

 + Update contributed modules.  The menu() hook changed drastically.  Updating your code adhere the new menu() function should be 90% of the work.  Moreover, ensure that your modue's admin links are still valid and that URLs to node get updated to the new scheme ('node/view/x' -> 'node/x').
2004-06-18 15:04:37 +00:00
Kjartan Mannes 7cd54567bd - Commiting patch #8288: Let modules pass $attributes to form_checkboxes() and form_radios(). 2004-06-04 18:10:05 +00:00
Dries Buytaert c0b85a5721 - Patch #4950 by Stefan (and Morbus): made watchdog messages translatable. 2004-06-02 19:01:40 +00:00
Kjartan Mannes c3463a22ae - Removing early experimental tab code that slipped in.
- Fixing a copy paste error in file.inc.
- Some double => single quote changes.
2004-06-02 18:26:44 +00:00
Dries Buytaert fbbf510511 - Patch #8105 by mathias: made the menu system aware of path aliases. 2004-06-01 21:58:46 +00:00
Dries Buytaert 7f08110a5e - Improved form handling.
+ Introduced two new functions:
      1. form_set_error($name, $message): files an error against the form
         element with the specified  $name.
      2. form_has_errors(): returns true if errors has been filed against
         form elements.

  + Updated the form handling:
       1. The form_ functions will add 'class="error"' when a form field
          has been found to be erroneous.
       2. The error message is passed to theme_form_element() when the
          particular form field has been found to be erroneous.

  + I updated the user and profile module to take advantage of these new
    functions.

  + IMPORTANT: the _user() hook changed.  The 'validate' case should no
    longer retun an error message when something goes wrong but should
    set it with form_set_error().
2004-05-31 09:40:56 +00:00
Dries Buytaert 07d53792c4 - Patch #8089 by matthias: make sure aliased links can be flagged as 'active'. 2004-05-28 20:05:15 +00:00
Dries Buytaert 436dcead77 - Patch #7725 by Marius: fixed glitch in e-mail address validation code. A subset of all e-mail addresses was rejected as valid. 2004-05-24 18:09:28 +00:00
Dries Buytaert 2e67c2ffa1 - Modified patch #7958 by Adrian: store status messages in a session so they can persist when redirection is used. 2004-05-22 22:21:49 +00:00
Dries Buytaert 10c5e95a2f - Made it possible for anonymous users to leave their name, e-mail address
and the URL of their homepage.  Patch by Pablo.
2004-05-18 18:41:46 +00:00
Dries Buytaert fed7e664de - Patch #6682 by jhriggs: added form_checkboxes(), much like form_radios()
and updated some modules to take advantage of it.
2004-05-15 15:42:47 +00:00
Steven Wittens 9b106e85fe Adding support for <optgroup> through form_select. See the PHPdoc for usage. 2004-05-05 15:58:26 +00:00
Steven Wittens 0f1f45c710 Standard text/html HTTP Content-Type was not cached, causing encoding issues on some server configurations. 2004-05-03 11:53:59 +00:00
Dries Buytaert b3265bcb86 - Patch #6887 by drumm: fixed drupal_http_request 2004-04-27 18:17:17 +00:00
Dries Buytaert 278c2d52e9 - Patch #7403 by jhriggs: the required-form-items patch that hit HEAD a few days back has an erroneous assignment in form_radios(). 2004-04-26 21:57:02 +00:00
Dries Buytaert bab922715d - Bugfix: strip all HTML from the feed description. 2004-04-24 16:25:31 +00:00
Dries Buytaert dc8a68ea28 - Patch #6791: mark required fields. Modified patch by Michelangelo. 2004-04-24 15:39:31 +00:00
Dries Buytaert 01e76e374f - Patch #6887 by Gerhard: fget -> fread for sake of compatibility. 2004-04-21 19:43:23 +00:00
Dries Buytaert 7231c88a32 - Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they
  can define 404 pages now.

  This needs to be documented in the "Changes since / migrating to ..."
  pages.
2004-04-21 13:56:38 +00:00
Steven Wittens a083daf841 Truncate UTF-8 patch. Introduced a new function truncate_utf8() for chopping off strings at unsure locations, without risking incomplete UTF-8 data. 2004-04-15 14:07:08 +00:00
Dries Buytaert be230467fd - Patch #6947 by Ax: fixed a Doxygen warning, fixed some uninitialized varables.
(I'm back from vacation.)
2004-04-12 08:27:57 +00:00
Dries Buytaert b9419fbcd6 - Partial patch 6680 by Brian: fixed invalid XHTML in search result page. 2004-03-31 22:50:23 +00:00
Dries Buytaert f3d419b74e - Fixed bug #6697: improved the URL validation function 2004-03-27 09:32:12 +00:00
Dries Buytaert a4a785e7a3 - Patch #6517 by kika: drupal_http_request() fails to open feed because on PHP 4.1.2. Also updated file.inc. 2004-03-24 18:58:36 +00:00
Dries Buytaert 6bd3c11a40 - Ported patch #6470 by Brian: fixed more XHTML erros related to multiple selects. 2004-03-24 06:01:43 +00:00
Dries Buytaert 93cf70d72e - Profile module improvements: added a URL-type field to the profile module.
We can use this for the 'URL of homepage' field on drupal.org.  URL fields
  are rendered as links and are being validated.
2004-03-21 10:28:10 +00:00
Dries Buytaert f10cca1182 - Patch 6345 by Chris: the 4th argument of form() is misnamed and used 0 as default value 2004-03-11 05:28:51 +00:00
Dries Buytaert 3ab169fc8b - Fixed bug #6345: drupal_attributes() adds redundant space. 2004-03-10 19:32:37 +00:00
Dries Buytaert 11988bcd92 - Improved drupal_not_found() 2004-03-08 18:35:04 +00:00
Dries Buytaert 0f980c24bc - Removed broken throttle. 2004-03-01 19:45:33 +00:00
Steven Wittens eadfa19239 Improved <label> patch: got rid of ID's by implicit association, and made radio/check labels non-bold again. 2004-02-24 20:22:45 +00:00
Dries Buytaert 5b5f148ad4 - Patch by Steven: added <label>s to checkboxes and radio buttons. 2004-02-23 07:28:18 +00:00
Kjartan Mannes 54c2aa8c4d - Fixed bug #5977: Date translation screwed.
- Fixed '\n' => "\n".
2004-02-21 14:08:09 +00:00
Steven Wittens e45b242468 - Added a short snippet to drupal_xml_parser_create() which invokes iconv() to convert unsupported encodings. 2004-02-17 23:36:22 +00:00
Dries Buytaert b5c18e8a17 - Patch 5592 by Goba: introduced a new function, drupal_map_assoc(). 2004-02-12 19:37:04 +00:00
Dries Buytaert f137b26979 - Patch 4902 by Goba:
+ only adds an optional parameter to url() and l(), so individual links
    can be set to be absolute
  + modifies drupal_goto() to accept the parameters of url() without the
    $absolute parameter, so cleaner invocations can be used
  + rework of some code in node_feed, making it much better to look at
    (the current code uses foreach with an immediate brake to get the first
    key of the associative array, geeeeez)
  + added xml:base to the rss tag generated by node_feed()
  + set all user mail URLs to be absolute
  + fix a small fragmented URL in user.module
2004-02-11 19:21:14 +00:00
Kjartan Mannes 97c2aa2bda - Modified format_date() to handle timezones properly. 2004-02-08 21:42:59 +00:00
Dries Buytaert ebba90fe68 - Patch #5708 by Goba: moved the URL aliasing functions to a common place, so
they will be part of the same documentation group, as well as created a new
  'formatting functions' group and added a lot of docs for them.  Also fixed
  some small errors reported by the doxygen parser.
2004-02-08 17:12:44 +00:00
Dries Buytaert 0db96f196a - Subset of patch 5613 by Goba: fixed some translation issues. 2004-02-05 22:58:59 +00:00
Dries Buytaert 928435a565 - Fixed bug 5532: search broken if any subsearch returns without results.
Patch by Goba.
2004-02-01 19:07:36 +00:00
Dries Buytaert c8daca07d2 - Patch #5448 by pz: removed code duplication from theme.inc. 2004-01-29 06:47:19 +00:00
Dries Buytaert 02c622dea1 - Patch 4332 by Goba: eliminate compose tips module. 2004-01-27 22:10:47 +00:00
Dries Buytaert 66190b1787 - Patch #5393 by Goba: changes the search hook return value, and requires an array
containing two elements, the first being the requested title, and the second being
  the result list. Advantages:
    * Cleaner search code in common.inc
    * Po extraction is possible and works fine
    * No hardcoded exceptions for node and comment modules, since any module can
      return results in order of relevance (or another order)
2004-01-26 19:22:22 +00:00