Commit Graph

521 Commits (bbca6b4828c9c1f038c1bcd2a83fb4659eadfd6b)

Author SHA1 Message Date
Steven Wittens 6c73823b10 Fixing a rather nasty bug with page cache:
The headers stored for cached pages ended in a newline, which caused header("") to get called when serving the page.
On some PHP versions (happens on 4.3.3 at least, but not in 5.0), PHP adds a blank header to the HTTP request (i.e. just \r\n) which ends HTTP headers prematurely and adds a newline at the beginning of the page.

This was not an issue before because we output HTML. Now that we have GZip compression, this bug caused corruption of the output. :P
*phew*
2004-07-29 01:41:33 +00:00
Steven Wittens edc2f13d82 - #9287: More doxygen/documentation fixes by JonBob 2004-07-22 16:06:54 +00:00
Steven Wittens b8d653f1e8 - Fixing bad strpos usage (have to use the ===/!== operators to check for 'false' in this case) 2004-07-21 15:30:35 +00:00
Dries Buytaert 50d78e9855 - Patch #9238 by JonBob: added code and Doxygen comments to common.inc and
bootstrap.inc.
2004-07-13 07:21:14 +00:00
Steven Wittens a080ce5f0f Slightly improved code in drupal_xml_parser_create. 2004-07-12 21:38:41 +00:00
Steven Wittens 77c0b577da Now Drupal tries iconv, recode and mbstring to convert unknown XML encodings to UTF-8. It also throws a friendlier error message when none of these extensions is installed. 2004-07-12 21:35:31 +00:00
Dries Buytaert 323d9fe054 - Call 'exit' hook when drupal_goto() is called. Also necessary for the
devel.module.
2004-07-11 07:31:11 +00:00
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
Dries Buytaert cdfa6b8e4d - Improvement #5388: removed unnecessary SQL queries when no URL aliases are defined. 2004-01-25 09:09:00 +00:00
Dries Buytaert c6be16d9ad - Patch #5351 by Kyber: fixed bug in field_get(). 2004-01-23 15:31:29 +00:00
Dries Buytaert fd86977cdd - Added missing permission check. Patch by Ax.
- Added a $granularity field to format_interval().
2004-01-21 06:40:57 +00:00
Dries Buytaert 3714827685 - Fixed bug 5247: active link marking invalidates HTML. Patch by Goba. 2004-01-19 21:57:42 +00:00
Dries Buytaert 1c3a303253 - Fixed incomplete input checking. 2004-01-17 23:19:02 +00:00
Dries Buytaert c37cfb0183 - Correction: I accidentically removed some $base_urls. 2004-01-14 22:41:15 +00:00
Dries Buytaert 6fc2070a22 Patch 5114 by Kjartan:
- Adds drupal_set_header() and drupal_get_headers().
 - Cache now stores custom headers.
 - Replace theme_head() with drupal_get_html_head(), added drupal_set_html_head().
 - Added RSS autodiscover links to node, blog and taxonomy pages.
2004-01-14 22:30:09 +00:00
Dries Buytaert 5fa33b2962 - Made l() add 'class="active"' to the active/current URL. 2004-01-12 22:53:43 +00:00
Dries Buytaert a8b8c247db - Patch #5021: clean up URLs in _help texts. Patch by UnConeD. 2004-01-11 20:31:26 +00:00
Steven Wittens f78cb9932b - Fixed ability to override default HTTP headers in drupal_http_request().
- Fixed issue with drupal_get_path_alias(): should return false for non-aliased URLs.
2004-01-07 20:43:26 +00:00
Dries Buytaert 94f6e94ffd - Many excellent news aggregator improvements by Kjartan:
+ Added drupal_http_request().
    + Replaced rssfeeds with OPML feed subscription list.
    + Added support for pubDate.
    + Added support for conditional gets using ETag and Last-Modified.
2004-01-07 19:52:10 +00:00
Kjartan Mannes 0d7e205062 - New and updated doxygen comments. 2004-01-06 19:52:14 +00:00
Steven Wittens b817bdb302 - Improved XML encoding fix. There is now a function drupal_xml_parser_create():
/**
 * Wrapper around xml_parser_create() which extracts the encoding from the XML
 * data first and sets the output encoding to UTF-8. This function should be
 * used instead of xml_parser_create(), because PHP's XML parser doesn't check
 * the input encoding itself.
 *
 * This is also where unsupported encodings should be converted.
 * Callers should take this into account: $data might have been changed after
 * the call.
 *
 * @param $data The XML data which will be parsed later.
 */
2004-01-06 12:09:42 +00:00
Steven Wittens c2151b5248 Committed filter separation patch: all filter-related things are now in filter.module (which is a required module).
To do this cleanly, I reorganised some bits of system.module: there is now a generic handler available for simple variable-get/set based configuration pages. Look at filter_admin() or system_view() for example usage.

(based on the patch by Goba)
2004-01-05 19:19:05 +00:00
Dries Buytaert daaeef0e8c - Partial patch #4927: mass URL aliasing by Goba. 2004-01-05 18:23:21 +00:00
Dries Buytaert 604064b523 - Patch #4858: search module did not remember the search filter. Patch by
Kjartan.
2004-01-02 12:15:37 +00:00
Dries Buytaert e8c7d2e092 - Made it possible to set and display multiple status messages. Modified patch by
Kjartan.
2003-12-30 12:10:51 +00:00
Dries Buytaert 21a0e8b904 - Updated code to use new semantics of url() and l(). 2003-12-29 19:49:11 +00:00
Dries Buytaert be2f405818 - Added $fragment identifier to url() and l(). Patch by Goba. 2003-12-29 19:10:26 +00:00
Dries Buytaert 0fc11d5719 - Fixed typo introduced by the <b> -> <strong> patches. This might need a better
fix.
2003-12-29 17:42:43 +00:00
Dries Buytaert 80f34e5ab0 - XHTML improvements: <b> -> <strong>. Patch by Stefan. 2003-12-29 17:14:27 +00:00
Dries Buytaert 41d28852f3 - Fixed glitch with form_radio(). Reported by Kjartan. 2003-12-29 12:44:30 +00:00
Dries Buytaert 81b21bc068 - Removed the ID from radio buttons: we'll need to rethink this a bit. 2003-12-29 11:16:45 +00:00
Dries Buytaert 9eba2ac77f - Removed the id= from checkboxes: it is acting weird in some cases. :oI 2003-12-28 00:13:22 +00:00
Dries Buytaert 15f289a8f0 - Added file handling. Work by Kjartan. 2003-12-26 23:03:21 +00:00
Dries Buytaert fb45b6b7df - Removed the ID from radio buttons for now: duplicate IDs confuse the browser. 2003-12-26 14:52:29 +00:00
Dries Buytaert 01f252ab7d - Refactored form_radios() such that less HTML code is emitted and such that
the options are not rendered in bold.
2003-12-24 12:40:28 +00:00
Dries Buytaert 770174b299 - Updated documentation, small bug fix and small improvements to the <label>
tags.

  To be discussed and investigated: when a form element has no title an empty
  <label> tag will be emitted (eg. "remember me" checkbox).  This doesn't make
  sense but is our best option for now.
2003-12-22 15:38:07 +00:00
Dries Buytaert 0439e3495c - Fixed password field. 2003-12-22 15:06:46 +00:00
Dries Buytaert 54a74abaa3 - Accessibility improvements: made the <label>-tags use the 'for'-attribute. 2003-12-22 14:45:00 +00:00
Kjartan Mannes c96a130e36 - Getting the fix rght. 2003-12-19 13:44:08 +00:00
Kjartan Mannes 81565fda5d - Fixing magic_gpc fix. 2003-12-19 10:52:37 +00:00
Kjartan Mannes 3d9e2f2c76 - Fixing wrong superglobal usage. 2003-12-18 13:58:59 +00:00
Dries Buytaert 09b660a608 - Small update 2003-12-18 08:18:06 +00:00
Dries Buytaert 670a292277 - Reworked 404 (page not found) handling. Patch by walkah. You can specify a
custom 404 page in the administration page.  As a result, error.php could be
  removed.
2003-12-16 21:06:34 +00:00
Dries Buytaert f229a8c04c - Patch 161 by Gordon: adds new form_button() function with a more generic version
of form_submit() which allows the creation of HTML buttons.
2003-12-15 19:58:53 +00:00
Dries Buytaert 009b1afe5c Patch by Kjartan:
+ Simplified cache logic in drupal_get_path_map().
 + Added check to see if errors should be reported to error_handler().
 + Use proper db_query() syntax in throttle(), and use $_ENV instead of
   getenv().
 + Changed fix_gpc_magic() to use array_walk (C functions will always be
   faster), and renamed _fix_gpc_magic_array() to _fix_gpc_magic().
 + Renamed $node in array2object() to $array.
 + Renamed $node in object2array() to $object.
 + Minor other coding method tweaks.
2003-12-13 14:59:55 +00:00
Dries Buytaert f153bcb9bb - Simplified the way the 'real path' is resolved. 2003-12-12 19:44:57 +00:00
Dries Buytaert b1ef96931a - Moved the watchdog() function to the bootsrap file. Patch by Moshe. 2003-12-10 23:09:31 +00:00
Kjartan Mannes 84c7e91a2d - Fixed <title> extraction deleting body.
- Fixed metaWeblog/Blogger incompatibilities in blogger.editPost and
  blogger.getRecentPosts.
- Fixed coding style deviations.
- Fixed access checks, now requires maintain personal blog.
- Fixed taxonomy integration.
- Fixed blogger.getUserInfo
- Improved user login/access error messages.
2003-12-09 23:38:32 +00:00
Dries Buytaert 3904790e03 - Tidied up the DoxyGen comments. Patch by Kjartan. 2003-12-08 06:32:19 +00:00
Dries Buytaert bea3dbb775 - Patch 0185 by Jeremy: made it possible to automatically disable modules when
under heave load.
2003-12-07 18:25:09 +00:00
Dries Buytaert 4e2c0b250e - Introduced a drupal_set_message() and drupal_get_message() function.
Contributed themes and modules need to be updated:
   - modules: status() is no more; use drupal_set_message() instead.
   - themes: use drupal_get_message() to check for status messages and
     visualize them.
2003-12-01 13:45:33 +00:00
Dries Buytaert b55975d61c - Doxygen improvements. Patch by Ax. 2003-11-26 16:17:13 +00:00
Dries Buytaert c0494c0a2b - Committed phase 4 of JonBob's menu system changes. 2003-11-25 19:26:21 +00:00
Dries Buytaert 06045ff7fc Patch by Ax to fixe and improve to the core doxygen PHPdoc:
* fixes all doxygen warnings [#]_ in the current code base
    + changes @param style from phpDocumentor (@param type $var desc) to doxygen (@param $var desc)
    + documents all undocumented parameters
    + escapes / fixes html warnings
    + fixes @defgroup in theme.inc
  * adds more groupings [#]_
    + drupal_{set|get}_title, drupal_{set|get}_breadcrumb
    + pager.inc: pager_api (pager_query(), pager_display()), pager pieces
  * adds a new group "themeable" which contains all themeable functions.
2003-11-24 22:46:03 +00:00
Dries Buytaert 26735ac5dd - Committed phase 3 of JonBob's menu changes. Adds an API for modules to
define titles and breadcrumbs for their pages, and updates the theme
  system to display them.
2003-11-23 10:41:04 +00:00
Dries Buytaert a0640e66b7 - Improved module loading when serving cached pages. Moshe's bootstrap patch.
- Used legend and fieldset tags for the configuration page.
2003-11-18 19:44:36 +00:00
Dries Buytaert fff2f548ac - Improved form items: added <label> tags to improve accessibility and added
theme_form_element() function to improve themeability.  I left form_item()
  and the calls to form_item() intact for now.
2003-11-17 19:16:55 +00:00
Dries Buytaert 36bb57555c - table(...) -> theme("table", ...) 2003-11-13 19:52:54 +00:00
Dries Buytaert 951b553a98 - Committed stage 2 of the theme system improvements! Patch by CodeMonkeyX. 2003-11-09 23:27:22 +00:00
Dries Buytaert 00ee7f747b - Removed the "return" link from the node submission confirmation page. 2003-11-09 17:25:11 +00:00
Dries Buytaert 00d638ca57 - Usability improvement: replaced many selection boxes by radio buttons.
Patch by Stefan.

- Usability improvement: introduced a form_group() function and updated
  the node and comment module to take advantage of it.  Patch #149 by
  Eric Farris.
2003-11-06 18:27:58 +00:00
Dries Buytaert ec33266795 - Improvement: made it possible to disable the comment controls and reworded some of the configuration settings.
- Improvement: removed a left-over from Drupal 4.2.0 (dead code).

- Improvement: replaced hard-coded XHTML around the XML icons with class="xml-icon".

- Improvement: removed the custom navigation menus shown at the top of the "user information page" and integrated them in the new navigation block.  The "my account" link in the navigation menu will unfold.  Also removed the "delete account" link/functionality (for now).

- Improvement: fix for "magic quotes" settings.  Patch by Steven.  I also removed check_php_settings().

- Improvement: block themability improvements.  Modified patch from Ax and Steve/CodeMonkeyX.

- Fixed bug #2617: editing user information does not work.  Patch by Kjartan.
2003-10-31 19:34:03 +00:00
Dries Buytaert 72ae2d3995 - Bugfix: renamed the 'statistics' table to 'node_counter' as 'statistics' is
a reserved SQL keyword.  Required for both PostgreSQL and MSSQL.  Patch by
  Adrian.

- Bugfix: renamed the 'path' table to 'url_alias' as 'path' is a reserved SQL
  keyword.  Required for both PostgreSQL and MSSQL.  Patch by Adrian.
2003-10-22 20:20:35 +00:00
Dries Buytaert 6958037da6 - Bugfix: made the "Default front page" setting work with URL aliases. Patch
by Matt.
2003-10-20 07:47:18 +00:00
Dries Buytaert 880842885b - Fixed bug #3637: made comment module settings translatable. Patch #13 by Moshe.
- Fixed bug #3642: removed duplicate settings from user page.  Patch #14 by Moshe.

- Fixed bug #3503: added 'forum topic' link to the 'create content' menu.  Patch
  by Gobar.  I think this might be more intuitive and consistent code-wise; I don't
  want to introduce small hacks.

- Cache improvement: small cache improvement to prevent SQL errors.  Patch by
  Jeremy.
2003-10-16 17:29:26 +00:00
Dries Buytaert 53f538fe1d - Usability improvement: improved consistency and themability of the search form. 2003-10-15 15:12:50 +00:00
Dries Buytaert 162ca6eb98 - Bugfix: the search result type names (node, user, comment) were not
translatable in the search page output.  Patch by Gabor.
2003-10-13 21:28:05 +00:00
Dries Buytaert 9285275387 - Small code improvement 2003-10-09 18:51:15 +00:00
Dries Buytaert d2175fdcbd - Fixed cache issue with path map. 2003-10-09 17:22:22 +00:00
Kjartan Mannes 6e86d70c4c - Fixing bug #3499: File upload tool does not display in 'create image' form 2003-10-07 10:22:33 +00:00
Dries Buytaert 35f3bcd042 - Path modoule improvements. Modified path by Matt. 2003-10-03 14:10:05 +00:00
Dries Buytaert fa2581edcf - Modifies path.module to get rid of pgsql reserved word. Patch by Adrian.
- Updates database.pgsql and database.mysql to work with current cvs. Patch
  by Adrian.

- Updates update.php to be able to update postgres from 4.2 to current.
  Patch by Adrian.

- Small fixes by me.
2003-10-01 05:18:03 +00:00
Dries Buytaert 6baa7d7c21 - Some URL alias fixes by Matt. 2003-09-30 20:59:26 +00:00
Dries Buytaert 5a667eb580 - Url aliasing improvements. Patch by Matt. See mailing list for more
information.
2003-09-30 17:01:34 +00:00
Dries Buytaert d80140b442 - Made sure dates can be translated nicely. Patch by Gobar. 2003-09-29 18:20:38 +00:00
Kjartan Mannes 9a0573a8e1 - Rolling back debug_backtrace(). Handy to have, but PHP 4.3 required. 2003-09-29 14:36:48 +00:00
Kjartan Mannes 57c60ddbe2 - Ick. Hit the backspace key before commiting. Undoing. 2003-09-29 13:44:39 +00:00
Kjartan Mannes 46e43ebed1 - Fixed cache's handling of HTTP headers (passed all 9 unit tests) 2003-09-29 13:41:22 +00:00
Kjartan Mannes 0c3cc7b487 - Fixing cache logic, the logic was inversed. 2003-09-29 09:32:45 +00:00
Dries Buytaert b8416f613a - Made the check for If-Modified-Since and Etag headers work for non-Apache
webservers.  This will, for example, improve caching on IIS.  Patch by
  Kjartan.
2003-09-28 17:21:57 +00:00
Dries Buytaert 18e840ac66 - Bugfix: fixed string being check_query()-ed twice. Bug #2425. Patch by
Matt.
2003-09-14 08:57:18 +00:00
Dries Buytaert b9633dcded - Patch by Bart Jansen:
<quote>

  This adds session support for anonymous users and fixes a bug/typo.

    1. changed rid for user #0 from 0 to 1 (rid 1 == anonymous user) to make
       inner join work.

    2. replaced "if ($user .." by "if ($user->uid .." because now $user is
       always set (my previous change probably caused this).

    3. db_next_id("user_uid") -> db_next_id("users_uid");
  </quote>

  I repeat:

  "This adds session support for anonymous users and fixes a bug/typo."
2003-09-10 19:30:34 +00:00
Kjartan Mannes 2feb19abc2 - fixing a invaild if that has slipped in. 2003-09-05 13:19:00 +00:00
Dries Buytaert 4d16c7c65b Implemented more suggestions by Keith:
- Made sure the 'Topic' title is only shown above the topics, not the icons.

- Automatically shorten the username when it is too long.  I implemented this
  as part of format_name() and could therefore nuke some code in the
  statistics module.  This is change is somewhat experimental and I'm willing
  to revert or change this if a number of people aren't too happy with this
  behavior.

- Left align the dates and authors: makes it easier/faster to scan.

- Made the little tablesort arrows clickable.
2003-08-22 21:35:25 +00:00
Dries Buytaert 0431f0700f - Committed Jeremy's session patch: this brings us one step closer to having
session for anonymous users.
2003-08-20 19:19:13 +00:00
Dries Buytaert 6ddeae9f5c - Bugfix: fixed problem with "exit" hook not always being called. Reported
by Jeremy.  Patch by Moshe.
2003-08-13 20:44:11 +00:00
Kjartan Mannes 48805032c8 - Applied modified version of almaw's 0064 patch: form item attributes.
- Applied modified version of mathias' 0073 patch: node form name.
  $params["options"] is now an array so some contrib modules might
  need minor changes.

- Applied mathhias' 0074 patch: missing access check on who is new
  block.
2003-08-12 20:37:16 +00:00
Kjartan Mannes 17ef869e3a Applied 0007.almaw.home-link-using-l.patch
- Fix link_page to use l() to generate home link.

Applied 0058.kika.themeable-usermenu.patch
- Modifies user menu be themeable.
2003-08-11 20:41:37 +00:00
Dries Buytaert 39950fe2e2 - Committed a modified version of Ulf's input checking changes. Patch #95.
I added an error message, changed a few things around and fixed tw typos.
2003-08-08 22:24:55 +00:00
Dries Buytaert 3833e4de9d - Cache system improvements by Gerhard: removed some left-overs. 2003-07-23 18:33:12 +00:00
Dries Buytaert 81ea70d101 - Bugfix: the cache wasn't always cleared properly. Patch by Gerhard. 2003-07-23 17:12:37 +00:00
Dries Buytaert 8759ca7368 - Commited the URL aliasing patch. Thanks Matt.
This update requires you to run update.php!
2003-07-16 20:14:26 +00:00
Dries Buytaert 337b3c9de9 - Committed a slightly modified version of Slavica's table prefix patch. 2003-07-10 17:46:44 +00:00
Dries Buytaert e5b392b5d7 - Fixed typo 2003-07-09 22:13:09 +00:00
Dries Buytaert 9fd25fa520 - Some more refinements 2003-07-09 22:07:50 +00:00
Dries Buytaert ae4fe72d17 - Changed the XSS check a little to be slightly more forgiving wrt style
attributes.
2003-07-09 21:48:13 +00:00
Dries Buytaert dc15ba06e0 - Improvement: don't perform XSS checks for trusted users. Trusted users
are those that have the "bypass input data check" permission set.  Should
  address bug #2147.

- Improvement: simplified index.php and modules/admin.module.

- Bugfix: fixed broken links in bloggerapi documentation.  Patch by Chris
  Johnson.  Fixes bug #2030.

- Bugfix: fixed the date shown on a book module preview.  Reported as part
  of bug #2097.

- Bugfix: fixed broken URL in the book module documentation.
2003-07-01 17:54:22 +00:00
Dries Buytaert 886ae2bf15 - Fixed some "search related" bugs introduced by Moshe's latest patch.
Fixes bug #2127.
2003-06-30 19:18:47 +00:00
Dries Buytaert da80e62042 - Removed "link" from the XSS check as well as "font". 2003-06-29 18:21:47 +00:00
Dries Buytaert 646bb31a42 - Improvement: faster regex/checks. Patch by Marco. 2003-06-28 07:05:34 +00:00
Dries Buytaert f4df719502 - Reworked the CXX checking; now, _any_ user input will be checked
and the request will be terminated when something suspicious is
detected.  This will be logged in the watchdog.  With help from Marco.

- Fixed translation issue in the archive module.  Patch by Gerhard.

- Removed dead parameter from variable_get().  Patch by Chris Johnson.
Fixes bug #2111.

- Improved input checking of taxonomy module.  Patch by Gerhard.
Fixes bug #2112.
2003-06-27 17:48:20 +00:00
Dries Buytaert e95aa56e02 - Bugfix: fixed bug in the search module that prevented the title module
from working properly.  Patch by Moshe.  Fixes bug #1852.
2003-06-25 22:10:54 +00:00
Dries Buytaert e756213b33 - Bugfix: fixed the "variables not set" problem (bug #2014). Patch by
Slavica.

  Sorry for the confusion guys - I had it applied on my tree for a couple
  of days now but forgot to commit it.
2003-06-23 07:24:56 +00:00
Dries Buytaert e57faf2192 - Bugfix: fixed problem with changing themes. Didn't apply Al's patch as
the fix was somewhat simpler.  Fixes bug #2003.

- Bugfix: fixed problem with voting on certain poll pages.  Patch #37 by Al.

- Improvement: removed stupid descriptions from profile module.
2003-06-20 17:43:03 +00:00
Dries Buytaert 828ba66500 - Bugfix: fixed utf-8 problem for people that use PHP 4.2.x or below. Patch #33 by Al.
- Bugfix: fixed translation problems in the user module and the block module.  Patch by Stefan.

- Improvement: made it impossible to delete user role #1 and #2.  Patch #38 by Al.

- Improvement: fixed the "Allowed HTML tag" issues.  Makes for better code and improved usability.  Patch #35 by Al.

  NOTE: as soon the compose tips make their way into CVS, most of this code can be removed.
2003-06-19 17:26:27 +00:00
Dries Buytaert eb030cb9d8 - Improvements: XHTML-ifications. Patch by GmbH. 2003-06-15 19:06:25 +00:00
Dries Buytaert 3e9aabe058 - Moved some CXX checks to a centralized place; less error-prone. 2003-06-14 07:02:32 +00:00
Dries Buytaert 1a2576036b - Bugfix: charset fixes/clean-up. Patch #52 by Al.
- Improvement: renamed some theme functions of the forum module for sake of consistency/readability.  Patch #2 by Kristjan.

- Improvement: usability improvements to the Xtemplate theme.  Patch #3 by Kristjan.

- Improvement: CSS'ified the book module pages.  Patch #3 by Al.  (I simplified the "l
ocation" part.  Al's approach gave you a bit more power but I'm not sure anyone wants
to change that.  Besides, this will change as soon we integrate the menu system so I kept it easy for now.)
2003-06-12 17:24:06 +00:00
Dries Buytaert 3b8c99d91e - Bugfix: fixed the CREATE FUNCTION in database.mssql as it needs to be prefixed with GO for some obscure reason. Patch by Kjartan.
- Bugfix: fixed the defaults for blocks in database.mssql so the NOT NULL fields get values.  Patch by Kjartan.

- Bugfix: changed check_form() to use htmlspecialchars() instead of drupal_specialchars() as this caused Drupal to emit incorrect form items in presence of quotes.  Example:

  <input type="submit" class="form-submit" name="op" value="Submit "top nodes" block changes" />

  IMO, drupal_specialchars() is better called xmlspecialchars() to avoid confusion.

- Bugfix: when an anonymous user visits a site, they shouldn't see any content (except the login block, if it is enabled) unless they have the "access content" permissions.  Patch by Matt Westgate.

- Improvement: improved the error checking and the error messages in the profile module.  Updated the code to match the Drupal coding conventions.  Modified patch from Matt Westgate.

- Improvement: don't generate the <base href=""> tag in the base theme; it is already emitted by theme_head().  Patch by Kristjan.

- Improvement: don't execute any SQL queries when checking the permissions of user #1.  Patch by Kjartan.

- Improvement: made a scalable layout form that works in IE and that behaves better with narrow themes.  Part of patch #51 by Al.

- Improvement: removed some redundant print statements from the comment module.  Modified patch from Craig Courtney.
2003-06-11 18:16:32 +00:00
Dries Buytaert a448f5a9b4 - Charset simpliciations. Patch #46 by Al. 2003-06-08 16:50:05 +00:00
Dries Buytaert aa38097c07 - Dropped check_input(); use check_query() instead.
- Made the statistics module use referer_uri() for security's sake.
2003-06-06 21:37:11 +00:00
Dries Buytaert 17cd7c497d - Added a function check_url() that CSS checks URLs (or parts thereof). 2003-06-06 21:08:35 +00:00
Dries Buytaert de3b0796d2 - Bugfix: better charset support for non-ISO-8859-1 languages. Patch 0029.charset.fixes.patch by Al. Could East Asia test this please.
- Bugfix: made the "moderate" field behave.  Patch 0030.queue.module.help.and.settings.form.patch by Al.

- Documentation: revised a large part of the help texts / documentation!  Al's 0024.* patches.

- Documentation: added a glossary to the help module.  Patch 0025.help.module.glossary.patch by Al and Michael.

- Usability: first step towards unifying the terminology used in the cloud module.  Patch by 0028.site.cloud.rationalize.name.patch Al.

- Usability + CSS improvements: revamped the node form and removed all tables.  Patch 0027.node.form.rewrite.patch by Al.

- CSS improvements: patch 0026.admin.css.small.improvement.patch by Al.

- Updated the MAINTAINERS file.
2003-06-05 18:09:39 +00:00
Dries Buytaert 355d25e73d - Bugfix: renamed the SQL field 'types' to 'nodes' because 'types' is a reserved keyword in MySQL 4. This fixes critical bug #1618. Patch by Marco.
==> This fix requires to run update.php!

- Bugfix: made sessions work without warnings when register_globals is turned off. The solution is to use $_SESSION instead of session_register().  This fixes critical bug #1797.  Patch by Marco.

- Bugfix: sometimes error messages where being discarded when previewing a node.  Patch by Craig Courtney.

- Bugfix: fixed charset problems.  This fixes critical bug #1549.  Patch '0023.charset.patch' by Al.

- Code improvements: removed some dead code from the comment module.  Patch by Marco.

- Documentation improvements: polished the node module help texts and form descriptions.  Patch '0019.node.module.help.patch' by Al.

- CSS improvements all over the map!  Patch '0021.more.css.patch' by Al.

- GUI improvements: improved the position of Druplicon in the admin menu.  Patch '0020.admin.logo.patch' by Al.

- GUI improvements: new logos for theme Marvin and theme UnConeD.  Logos by Kristjan Jansen.

- GUI improvements: small changes to the output emitted by the profile module.  Suggestions by Steven Wittens.

- GUI improvements: small fixes to Xtemplate.  Patch '0022.xtemplate.css.patch' by Al.

TODO:

- Some modules such as the buddy list module and the annotation module in the contributions repository are also using session_register().  They should be updated.  We should setup a task on Drupal.

- There is code emitting '<div align="right">' which doesn't validate.

- Does our XML feeds validate with the charset changes?

- The forum module's SQL doesn't work properly on PostgreSQL.
2003-06-04 18:24:39 +00:00
Dries Buytaert 05288ac48a - Bugfix: made request_uri() rewrite ( and ) with their entity equivalents
to avoid XSS attacks!  Patch by Al, Moshe, Marco, Kjartan and me.

- Bugfix: the admin module does now import drupal.css prior to admin.css.
Patch by me.

- Bugfix: the admin module was still emitting a <base href=""> tag.  I
removed this as it is been taken care of by theme_head();  Patch by me.

- Bugfix: made the tracker module's pager only consider published pages.
Patch by Moshe.

- Bugfix: cured some typos in the comment module's help function.  Patch by
Marco.

- Bugfix: fixed a typo in the pager_display() that caused optional
attributes to be discarded.

- Bugfix: made the Xtemplate emit empty boxes like any other theme does.
Patch by Al.

- Bugfix: fixed broken link on the statistics module's log page.
Reported by Kjartan.

- CSS improvements: made the HTML output emitted by the tracker module
look nicer.  Patch by Moshe and Al.

- CSS improvements: added CSS classes for form elements.  Patch by Al.

- CSS improvements: added a vertical gap between the last form item and the
submit button.  Patch by Al.  Note that Opera 6 is not picking up this
CSS but apparently others browsers such as Konqueror do.

- Xtemplate improvements: changed the color of the selected day in the
archive module's calendar.  Patch by Al.

- Usability improvements: made the "birthday" field of the profile module
look nicer.  Patch by Al.

------

- TODO: it might be a good idea to emit the following meta tag in the
theme_head() function:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Currently, some themes (and modules!) emit this while others don't.  This
would also make it possible to change the charset site-wide.

- TODO: now we added support for td.dark and td.light to drupal.css, maybe
it can be removed from admin.css as well as xtemplate.css?
2003-06-03 18:04:47 +00:00
Dries Buytaert 4582eeccd0 - Another register globals fix. Patch by Kjartan. 2003-06-01 19:51:40 +00:00
Dries Buytaert 82019d89fb - Omit "index.php" when using Apache. Patch by Al. 2003-05-31 13:05:06 +00:00
Dries Buytaert c6f9ca540d - Fixed typo. Patch by Marco. 2003-05-30 11:01:56 +00:00
Dries Buytaert 4499241fa1 - Make sure the HTML filter is applied before any other filter. Patch by
Al.
2003-05-30 05:45:35 +00:00
Dries Buytaert 1fc8a18c2d - Al's CSS patches. This commit improves the themability of some core
components such as lists, form items, removes an ugly hack from the
  archive module and should fix the poll problem (although it doesn't
  Opera/Konqueror).
2003-05-29 10:18:38 +00:00
Dries Buytaert 45d5aad6df - Updated Drupal to use "on output" filters. Derived from Gerhard's patch. 2003-05-24 16:26:13 +00:00
Dries Buytaert 9863dd5a71 - Fixed typo in URL(). Patch by Al.
- Added a filter option to disable/enable the rewrite_old_urls() filter.
  See task #1542.
2003-05-23 21:59:44 +00:00
Dries Buytaert 5bd07f4bb2 - Fixed search module bug. Patch by Michael. 2003-05-23 17:59:25 +00:00
Dries Buytaert b68b2798d2 - Fixed a IIS bug with regard to register globals. This also avoids the
aforementioned ugly hack.  Patch by Moshe.
2003-05-20 04:41:36 +00:00
Dries Buytaert bf28f8709b - Applied Moshe's patch that should make clean URLs work on IIS. I removed
a little hack that sometimes patches the request_uri(); I don't think
  this should trigger in first place.  If it does, let me know the URL of
  the form as well as the referring page.  (If this needs fixing after all,
  fixing this _inside_ request_uri() might be a better solution.)
2003-05-19 18:26:49 +00:00
Dries Buytaert 57c7d7b43b - The page_footer() function was always called twice due to the introduction
of the "footer" hook (and because of the existence of the page module).
  This caused the node view counter to be incremented twice per page view,
  the cache being set twice, etc.  Quite a bug.
2003-05-18 09:48:49 +00:00
Dries Buytaert c2d2fb7309 - Fixed a typo in the PostgreSQL database scheme. Patch by Michael Frankowski.
- Fixed a typo in the MSSQL database scheme.  Patch by Michael Frankowski.

- Removed dependency on "register_globals = on"!  Patches by Michael Frankowski.

  Notes:

  + Updated the patches to use $foo["bar"] instead of $foo['bar'].
  + Updated the INSTALL and CHANGELOG files as well.

- Tiny improvement to the "./scripts/code-clean.sh" script.
2003-05-13 18:36:38 +00:00
Dries Buytaert a161110a6b - Applied Michael Caerwyn's "%s -> %d" patch.
- Changed all occurences of '%d' to %d as suggested on the mailing list.
2003-05-07 21:00:36 +00:00
Dries Buytaert c2f3cb2b63 - Renamed 'xmlrpc_decode' to '_xmlrpc_decode' to avoid redeclaration when
PHP's XML-RPC library is enabled.

- Renamed 'xmlrpc_encode' to '_xmlrpc_encode' to avoid redeclaration when
  PHP's XML-RPC library is enabled.

- Removed 'if (funcion_exist("xmlrpc_encode"))' check from common.inc.
2003-04-29 22:02:02 +00:00
Dries Buytaert 709d9ec592 - Forgot to commit the modified "includes/common.inc" when applying the
htmlArea related modifications.  Thanks Gordon.
2003-04-23 18:58:43 +00:00
Dries Buytaert cfb4d31f65 - Added missing quotes, initialized a variable an improved the error reporting
a little.
2003-04-21 12:36:09 +00:00
Dries Buytaert 61780d8516 - Fixed bug in cache_get(). Patch by Anarcat. 2003-04-13 14:12:43 +00:00
Dries Buytaert 02f437a2f4 - Renamed 'validate_email_address' to 'valid_email_address'.
- Added a 'form_radio' function.
2003-04-13 13:42:51 +00:00
Dries Buytaert 62f5ae01f6 - Some coding style fixes. 2003-04-03 22:18:27 +00:00
Dries Buytaert 3ad7449bc7 - Various improvements to the menu system.
- Changed the import and taxonomy module to use better URLs.  Patches by
  Al.

- Fixed locale module weirdness.  Patch by Kjartan.
2003-04-01 06:05:15 +00:00
Kjartan Mannes e73a163dbd - Rollback: $cid in cache_set() is not required to be numerical. 2003-03-29 18:08:56 +00:00
Dries Buytaert 4742ba3549 - Fixed some SQL query directives. 2003-03-29 16:30:40 +00:00
Dries Buytaert d1be768b28 - Moved the logic of email validation from user_validate_mail to a new function
in common.inc.  Modified patch from Gerhard.
2003-03-28 10:55:27 +00:00
Dries Buytaert 64b6cb5897 - Removed one line of dead code. 2003-03-19 22:01:38 +00:00
Dries Buytaert 8952e9c53e - Rollback: do not initialize the theme before initializing the user. 2003-03-17 07:01:12 +00:00
Dries Buytaert 2c0f3c9457 - Cache improvement: only flush cache when told to. 2003-03-16 21:49:33 +00:00
Kjartan Mannes 46cbc276a6 - Adding O modifier to format_date. 2003-03-09 16:55:07 +00:00
Dries Buytaert a3b25924bd - Removed debug statement 2003-03-08 21:15:10 +00:00
Dries Buytaert c1734532f7 - Made rewrite_old_url() distinguish between absolute and relative URLs.
In case of a absolute URL it will try not to rewrite outgoing/external
  URLs.
2003-03-08 21:10:22 +00:00
Kjartan Mannes a0deb476fa - Changed _nodeapi("conf") to _nodeapi("settings").
- Changed node settings page to use table().
- Minor code beautification here and there.
2003-03-08 14:35:42 +00:00
Kjartan Mannes 831ee21303 - Renamed "form.admin" to "form admin".
- Added node_admin_settings() to let users set node defaults.
    * Added _nodeapi("conf")
- Modified form_checkbox() to unset options. (Modified the patch from Ax.)
- Removed the _save() hook.
- Fixed a logical flaw in field_get() and field_set() which would break
  moderation.
- Moved some admin menus around and cleaned up some typos.
2003-03-07 22:11:44 +00:00
Dries Buytaert 914bd030e6 - Fixed typo: "data_format" -> "date_format_short". Patch by walkah. 2003-03-07 17:32:01 +00:00
Dries Buytaert d659fedb38 - Removed the path_uri() function in favor of the $base_url variable and
fixes a handful of bugs introduced by the clean URL patch.
2003-03-07 06:37:30 +00:00
Dries Buytaert 7775d5a327 - Fixed "SELECT lid, FROM locales WHERE string = 'Reset to defaults'" problem:
invoke module_init() *after* the locale module has been initialized.  The
  system module was translating string from within its init hook which is now
  possible/allowed.
2003-03-04 17:44:37 +00:00
Dries Buytaert b10c5f4233 - Small improvement to locale_init(). 2003-03-04 15:10:37 +00:00
Dries Buytaert f4cdeb1f5a - Calls set_error_handler("error_handler") before locale_init() /
theme_init() so that errors happening there will be handled and don't
result in warnings printed.  Patch by Ax.
2003-03-04 06:19:01 +00:00