Commit Graph

1300 Commits (3329ad927c93b86587ec6ef3b7804ddcf1948384)

Author SHA1 Message Date
Dries Buytaert 3b1e763d03 - Patch #30423 by Crell: added support for table <captions>.
TODO: look into http://drupal.org/node/28777?
2005-09-06 20:32:53 +00:00
Dries Buytaert d7139b85db - Bug #30390: fixed parse error. Alternative fix. 2005-09-06 19:00:55 +00:00
Dries Buytaert e03ce2f996 - Patch #28483 by Steven: JavaScript enabled uploading.
Comment from Steven: It does this by redirecting the submission of the form to a hidden <iframe> when you click "Attach" (we cannot submit data through Ajax directly because you cannot read file contents from JS for security reasons).  Once the file is submitted, the upload-section of the form is updated.  Things to note:

    * The feature degrades back to the current behaviour without JS.
    * If there are errors with the uploaded file (disallowed type, too big, ...), they are displayed at the top of the file attachments fieldset.
    * Though the hidden-iframe method sounds dirty, it's quite compact and is 100% implemented in .js files. The drupal.js api makes it a snap to use.
    * I included some minor improvements to the Drupal JS API and code.
    * I added an API drupal_call_js() to bridge the PHP/JS gap: it takes a function name and arguments, and outputs a <script> tag. The kicker is that it preserves the structure and type of arguments, so e.g. PHP associative arrays end up as objects in JS.
    * I also included a progressbar widget that I wrote for drumm's ongoing update.php work. It includes Ajax status updating/monitoring, but it is only used as a pure throbber in this patch. But as the code was already written and is going to be used in the near future, I left that part in. It's pretty small ;). If PHP supports ad-hoc upload info in the future like Ruby on Rails, we can implement that in 5 minutes.
2005-08-31 18:37:30 +00:00
Dries Buytaert 75fad91cf5 - Patch #22911 by Cvgbe: fixed table locking in PostgreSQL. You'll have to
use db_lock_table() and db_unlock_tables() for your code to be compatible.
2005-08-29 19:32:55 +00:00
Dries Buytaert 8ae8865abc - Patch #22911 by Cvgbe: fixed table locking in PostgreSQL. You'll have to
use db_lock_table() and db_unlock_tables() for your code to be compatible.
2005-08-29 19:17:17 +00:00
Dries Buytaert 34544d4dc0 - Unrolled patch #29103: always encode apostrophes. 2005-08-28 16:19:24 +00:00
Dries Buytaert c9fc300b1f - Patch #29785 by Chx: multiple node types were broken so we refactored
part of the node system!  If you have a module that implements node
  types, you'll have to udpate its CVS HEAD version.

  We replaced _node_name() and _node_types() by _node().  The new _node()
  hook let's you define one or more node types, including their names.
  The implementation of the _node() hook needs to:

   return array($type1 => array('name' => $name1, 'base' => $base1),
                $type2 => array('name' => $name2, 'base' => $base2));

  where $type is the node type, $name is the human readable name of the type
  and $base is used instead of <hook> for <hook>_load, <hook>_view, etc.

  For example, the story module's node hook looks like this:

    function story_node() {
      return array('story' => array('name' => t('story'), 'base' => 'story'));
    }

  The page module's node hook module like:

    function page_node() {
      return array('page' => array('name' => t('page'), 'base' => 'page'));
    }

  However, more complex node modules like the project module and the
  flexinode module can use the 'base' parameter to specify a different base.

  The project module implements two node types, proejcts and issues, so it
  can do:

    function project_node() {
      return array(
       array('project_project' => array('name' => t('project'), 'base' => 'project'),
       array('project_issue' => array('name' => t('issue'), 'base' => 'project_issue'));
    }

  In the flexinode module's case there can only one base ...

  This hook will simplify the CCK, and will make it easy (or easier) to merge
  the story and page module.

  In addition, node_list() became node_get_types().  In addition, we created
  the following functions: node_get_name($type) and node_get_base($type).
2005-08-28 15:29:34 +00:00
Dries Buytaert 7b8a409675 - Patch #29385 by chx: no ?> add end of files. 2005-08-25 21:14:17 +00:00
Dries Buytaert afeff189b8 - Bug #22911: PostgreSQL doesn't like "LOCK TABLES", but does like "LOCK TABLE". MySQL likes both. 2005-08-25 21:11:52 +00:00
Dries Buytaert 8dd4b46351 - Removed some debug code. 2005-08-25 20:56:32 +00:00
Dries Buytaert 405cb49a0b - Patch #25084 by Uwe: fixed code comments of error_handler(). 2005-08-23 05:19:44 +00:00
Dries Buytaert 6a4e6df36f - Patch #17592 by killes: improved access denied messages. 2005-08-22 20:39:43 +00:00
Dries Buytaert 7d9f29aca7 - Patch #28629 by chx: fixed handling of cookies in drupal_http_request(). 2005-08-22 20:24:53 +00:00
Dries Buytaert 75abab2451 - Patch #29274 by Jeremy: the "fuzzy cache" mechanism is supposed to enforce a minimum time before the cache table is flushed. Logical errors in the fuzzy cache implementation are leading to the cache table being flushed more frequently. Configuration is simplified by removing all references to "strict" and "loose" caches. Instead, the cache is either "disabled" or "enabled". Additionally, the site administrator can now configure the "minimum cache lifetime", the minimum amount of time cached data will remain cached. 2005-08-22 05:09:01 +00:00
Dries Buytaert a33b922fcc - Patch #29103 by chx: do not encode apostrophes. 2005-08-19 11:10:35 +00:00
Dries Buytaert 1836d3b365 - Patch #29002 by Neil: list_themes() currently returns all themes, not just enabled themes. This functionality is only used in one place- configuration for disabled themes. These configuration pages can be removed with a usability improvement since you shouldn't be able to configure things which are disabled. Additionally, this allows us to remove some extra logic in system_user(). And it it more consistent with the module API which only lists enabled modules.
list_themes() sorts the results by name. This uses filesort in MySQL since there aren't any indexes. Sorting is not used except in system_user(). This one use can be handled with ksort since it is not often executed (only on the user edit screen when multiple themes are enabled).

And a one line fix to remove a variable in system_user() is in here too.
2005-08-18 22:07:14 +00:00
Dries Buytaert b14ae54d62 - Patch #7458 by chx: fixed spaces. 2005-08-17 19:14:08 +00:00
Dries Buytaert d6bcdafeed - Patch #7458 by chx: merged the XML-RPC multicall support into xmlrpc() and use lazy-loading for the XML-RPC libraries.(performance improvement). 2005-08-17 15:01:14 +00:00
Steven Wittens e5a8977ac1 - Remove left-over commented out statement. 2005-08-17 01:25:07 +00:00
Dries Buytaert 26fa7c730f - Patch #16216 by nedjo: multiple block regions! 2005-08-16 18:06:18 +00:00
Dries Buytaert 6ef678e447 - Patch #28871 by Malthus: added missing quotes. 2005-08-15 11:47:09 +00:00
Dries Buytaert 30f95a331f - Patch #28861 by Malthus: fixed typo in XML-RPC backend. Missing $.
- Made chx the XML-RPC maintainer.
2005-08-14 22:27:40 +00:00
Dries Buytaert 00d21d5cee - Patch #28826 by chx: make xmlrpc_multicall working. 2005-08-14 09:53:40 +00:00
Dries Buytaert 31741b2c99 - Patch #25522 by Cvbge: _db_query() does not return FALSE in case of errors as stated in documentation. 2005-08-11 13:51:07 +00:00
Dries Buytaert b69b43d1ec - Patch #28482 by Uwe: add CVS $Id$ tags to all source files in Drupal core. This allows admins to know exactly which version of which files they use. In addition I want to use CVS $Id$ tags in my upcoming security.module to check for possible vulnerabilities. That's not possible if some files simply don't have $Id$s.
Note: I also (mostly) unified the tags to use the "// ID" form instead of "/* ID */", but that's more of a cosmetic issue. I'm not sure whether *.txt files and the stuff in themes/ need tags(?).
2005-08-11 12:57:41 +00:00
Dries Buytaert 9dec4430b2 - Patch #27980 by Neil Drumm: removed unused function. 2005-08-10 20:50:14 +00:00
Dries Buytaert 8c92c8d48b - Patch by Thomas: always use db abstraction layer 2005-08-10 20:42:54 +00:00
Steven Wittens 0c8d742283 - #28464: fix XMLRPC array vs. struct type-checking 2005-08-08 18:46:32 +00:00
Steven Wittens 0bf97bed03 - #27853: PHP notices. 2005-08-05 00:49:02 +00:00
Steven Wittens 8660655a9a - #27981: Add media parameter to theme_add_style 2005-08-05 00:22:03 +00:00
Dries Buytaert 7625a4e91a - Patch #27737 by Gerhard: format_name($object) -> theme('username', $object).
Usernames can now be themed; eg. an icon/avatar could be added.

  TODO: update contributed modules + update the migration docs.
2005-08-01 05:14:05 +00:00
Dries Buytaert 0a28c17cac - Patch #27863 by Robrecht: fixed order of parameters passed to imagecopy(). Could result in black images. 2005-07-31 10:16:12 +00:00
Dries Buytaert 9e6373820a - Patch #27431 by Cvbge: add file size infomation to image_get_info() 2005-07-31 09:57:27 +00:00
Steven Wittens 897aae3e31 - #27846: Clean up dev_query code in db_query() 2005-07-30 18:01:51 +00:00
Steven Wittens c81bbf4aa1 - #24673: Fix deprecated usage of implode 2005-07-30 12:52:54 +00:00
Steven Wittens ab8377f02b - Fix braino in doxygen. 2005-07-29 19:07:17 +00:00
Steven Wittens 39aaf29d5c - Fix braino in doxygen. 2005-07-29 19:05:03 +00:00
Steven Wittens f8163b4fe3 - #11689: Fix locale import location cutting off thingie. 2005-07-29 18:56:58 +00:00
Steven Wittens aa2de74fa2 - #27624, #27614, #27627: dead code 2005-07-29 08:18:20 +00:00
Steven Wittens 3084036576 - #27231: (fix) Pretty db error screens. 2005-07-29 07:49:43 +00:00
Dries Buytaert 4103aada88 - Patch #27645 by Neil: refactor away module_load_all().
"This function is called in one place, so it can be rolled into the calling function. The return value isn't used so we can remove handling of it. This is executed for every non-cached page view, so the smaller code should save a smallish ammount of memory and time."
2005-07-29 07:09:30 +00:00
Steven Wittens 7aa20d30d8 - #27668: Replace deprecated tags/attributes with XHTML/CSS in locale.
- (#15121) Improve string cut-off for locale table
2005-07-29 06:50:10 +00:00
Steven Wittens 354e0c1f83 - #23651: Display referrer info with watchdog messages. 2005-07-29 04:12:19 +00:00
Steven Wittens d9d4b9bdab - #27231: Friendly DB error screens. 2005-07-27 01:58:43 +00:00
Steven Wittens 11a4aba9a6 - #26688: Add mbstring support to Drupal and clear up string handling fuzzies. 2005-07-25 20:40:35 +00:00
Steven Wittens dd2c576599 - #26688: Add mbstring support to Drupal and clear up string handling fuzzies. 2005-07-25 20:38:30 +00:00
Dries Buytaert ba1660168f - Patch #27003 by Neil: use named constants instead of strings 2005-07-23 05:57:27 +00:00
Dries Buytaert 31387c5a77 - Patch #26467 by drumm: make the destination persist across multiple pages
and fixed the node delete form to use a return destination.
2005-07-20 10:48:20 +00:00
Dries Buytaert ed3bf725bb - Patch #26391 by chx: replaced the old XML-RPC library with a smaller/better/working one. 2005-07-13 18:46:15 +00:00
Dries Buytaert 2c2d981e86 - Optionally show dots after truncation. TODO: update user.module to take advantage of this. 2005-07-06 14:20:11 +00:00
Dries Buytaert fac840fe86 - Patch by Bart: fixed update.php after bootstrap patch. 2005-07-03 10:09:08 +00:00
Dries Buytaert db3a2cc175 - Patch #11927 by stefan/Robin: improved theming of tablesort icons. 2005-07-02 12:32:09 +00:00
Dries Buytaert 2c10ff4b5f - Fixed problems with filter formats and problem with XML-RPC server. 2005-06-29 19:53:14 +00:00
Dries Buytaert 578d266d2f - Patch #25816 by Robert Douglass: removed extra load of boostrap.inc. 2005-06-27 18:38:46 +00:00
Dries Buytaert 58aee8cdad - Patch #25603 by Stefan: made the sizes of forms consistent.
TODO: document the defaults in the PHPdoc comments.
2005-06-27 18:33:33 +00:00
Dries Buytaert 5c8843704c - Patch #18213 by chx: boostrap system. Modified to work with HEAD, tidied
up the documentation a little.

  chx: can you double-check whether the global $conf variable is secure?
       (That is, make sure it can't be send using the URL or something.)
2005-06-22 20:19:58 +00:00
Dries Buytaert 4c77761efb - Patch #3962 by deekayen: improved error message when a blocked user attempts to login. 2005-06-21 18:21:08 +00:00
Dries Buytaert e550f84162 - Patch #16204 by Thox: committed the collapsible form elements patch.
NOTE: this patch works well, but the improved node edit form still has
        some rough edges.  It is important that we continue to improve
        usability.  Give it a try.
2005-06-21 09:45:45 +00:00
Dries Buytaert eb536bf5ec - Patch #24157 by chx/Robin/...: changed file_exists() to is_file() to fix several problems with modules using theimage toolkit. 2005-06-19 08:59:06 +00:00
Dries Buytaert abc16b1d6d - Patch #25067 by Thox: renamed 'light' and 'dark' to 'odd' and 'even'.
TODO: update the "Migrating themes from Drupal 4.6 to Drupal HEAD"-page in
        the Drupal handbook!
  TODO: update the themes in the contributions repository.
2005-06-19 08:50:46 +00:00
Dries Buytaert a7af266b6d - Patch #25143 by Robin: use count() instead of is_array() so we don't render code for empty arrays, and such you don't get warnings using PHP5. 2005-06-19 08:13:14 +00:00
Dries Buytaert 1474632aa0 - Patch #24135 by Moshe: made it possible to ban visitors based on hostname/IP. Banning visitors can either be done from the 'access control' pages, or directly from the statistics pages. This feature is very convenient to block badly behaving crawlers. 2005-06-07 18:54:37 +00:00
Steven Wittens 2f28cc0bcc - #24278: Emit correct XHTML <link> tag. 2005-06-05 19:10:53 +00:00
Dries Buytaert efdd76ad3d - Patch #22416: fixed typo that prevented menu item descriptions from showing up in links. 2005-06-05 09:47:13 +00:00
Dries Buytaert 12ea785baf - Patch #24141: fix XML UTF-8 bom issue with PHP5.
Workaround for the fact that PHP5 cannot parse UTF-8 encoded XML feeds
  that start with the so-called "byte order mark".
2005-06-04 14:13:43 +00:00
Steven Wittens a597354bcb - Code cleanup: improve format_plural usage, add some missing placeholder/check calls, and introduce API for <link> tags. 2005-05-31 21:14:27 +00:00
Steven Wittens 025bca28aa - Forgot about tablesort dependency on pager. 2005-05-31 19:54:31 +00:00
Steven Wittens b5ece96886 - Fixing charset in mime_header_encode() 2005-05-30 18:08:49 +00:00
Steven Wittens 82e606f7ab - #23700: Fix some broken t()'s in common.inc 2005-05-26 23:39:25 +00:00
Dries Buytaert 0250938e2b - Patch #17028 by Ber: theme xml_icon should allow inline XML icons. 2005-05-26 19:08:14 +00:00
Steven Wittens 67ebcfd084 - Mime_header_encode() was buggy. Each chunk of encoded text must be
a valid UTF-8 string, beginning and ending on a character boundary.
2005-05-25 06:28:59 +00:00
Steven Wittens 6be2c61896 - #20809: User-configurable, per-theme, optional favicons. 2005-05-25 06:03:18 +00:00
Steven Wittens 753bc588d9 - Fix mistakes in pager patch. 2005-05-25 05:42:05 +00:00
Steven Wittens 7ecb1b7c9c - #23387: form() should respect block-level elements 2005-05-25 04:18:54 +00:00
Steven Wittens a52bb9b1dd - #23516: Remove ][ from form item id's. 2005-05-25 03:50:25 +00:00
Steven Wittens 3598cbb988 - #23495: Clean up pager code. Now uses $page instead of $from, and counts pages, not items. 2005-05-25 03:29:06 +00:00
Dries Buytaert 8aba3a430b - Patch #23530 by Thox/Robin: removed the wrap="virtual" attribute from textareas. According to Thox this is no longer neccessary. Makes textareas validate as XHTML. 2005-05-24 20:38:00 +00:00
Steven Wittens 58bddf8abc * cue Star Wars theme tune *
Return of the JavaScript!

- #22519: form_autocomplete(): Ajax based autocompletion. Currently used for user names and folksonomy tags.
2005-05-24 06:00:22 +00:00
Dries Buytaert 7dcb9086f8 - Patch #23465 by Gerhard: tiny performance improvement to db_query_range(). 2005-05-23 21:14:01 +00:00
Dries Buytaert a7bced320e - Patch #18663 by chx: fix empty form elements. 2005-05-21 18:33:59 +00:00
Dries Buytaert cdec2f7e3e - Patch #16303 by Gerhard: fixed some warnings. 2005-05-21 11:33:03 +00:00
Dries Buytaert d77cf05823 - Patch #23211 by Neil: better formatting of sizes in format_size(). 2005-05-20 11:31:16 +00:00
Steven Wittens 5154c3aca4 - Fixing some plain/url check calls. 2005-05-18 21:12:17 +00:00
Dries Buytaert c3cf0622b6 - Patch by Drumm: one more attempt at fixing file_create_path(). 2005-05-18 05:17:11 +00:00
Dries Buytaert fa2469c1dd - Patch #23028 by chx: fixed file_check_location() problems. 2005-05-17 20:49:54 +00:00
Dries Buytaert b0c9983190 - Patch by James/Gerhard: made file_create_path() more robust. 2005-05-14 21:05:08 +00:00
Dries Buytaert ae98abc15b - Patch #22652 by Stefan: improved PHPdoc of drupal_set_message(). 2005-05-14 18:32:22 +00:00
Dries Buytaert 139ef4027c - Patch #22035 by mathias/mikeryan: improved performance of path aliases. 2005-05-14 09:23:47 +00:00
Dries Buytaert f2d200f51e - Patch #19442 by chx: cache_set sometimes failed.
TODO: this patch lets us clean up more code in code!  Let's have a look
        at this ...
2005-05-12 14:36:43 +00:00
Dries Buytaert 2b7f504dc8 - Added the ability to track page generation times in the statistics module.
(Made some improvements as per the suggestions in the issue.)

- Added extended timer implementation.
2005-05-12 11:21:35 +00:00
Dries Buytaert 55dc257b77 - Patch #22307 by Robert: added missing ')' 2005-05-10 19:59:45 +00:00
Dries Buytaert 39d0fe9a38 - User module improvements: added an 'access' column to the users-table to
keep track of the user's last access. In turn, this allowed me to:

  1. Optimize the "Who's online" block.  On drupal.org, the "Who's online"
     block requires 32 SQL queries.  With this patch, only 2 queries are
     left (eliminated 30 SQL queries), and one of the two remaining queries
     became appr. 20 times faster.

  2. Correct the "Last access" column in the user administration overview
     table.  The presented data was not accurate, which led to the column
     being removed.  You can now sort users by 'last access'.
2005-05-07 11:39:54 +00:00
Steven Wittens 89ae34de47 - #19621: More sensible status messages for forum admin ("created forum" instead of "created term"). 2005-05-07 01:48:06 +00:00
Dries Buytaert 4d95035518 - Patch #22118 by Robin Monks: made file_transfer() more robust. 2005-05-06 09:31:45 +00:00
Dries Buytaert 03250bd3e3 - Patch #21397 by jjeff: fixed behavior of theme_image with regard to attributes. 2005-05-06 09:01:46 +00:00
Dries Buytaert 2debcfb1ef - Patch #15595 by Stefan and Djun: improved status messages.
TODO: we should write down a couple guidelines for these document them in
        the PHPDoc code of drupal_set_message()!  .
2005-05-05 22:22:46 +00:00
Dries Buytaert 77f6f233f8 - Modified patch #21980 by willmoy: made form_group() accept HTML attributes. 2005-05-05 09:07:08 +00:00
Dries Buytaert 6658273b36 - Patch #21855 by TDobes: the recent commit of phptemplate caused a number of problems for non-phptemplate themes. A patch is attached to address these issues.
Changes include:
    * parsing of the primary/secondary links has been moved out of phptemplate and into theme_get_setting.
    * unnecessary and XHTML-invalidating duplicate div#help removed from themes/bluemarine/page.tpl.php (this is already generated by theme_help)
    * weird generation of the "edit primary/secondary links" messages removed from bluemarine and placed in theme.inc
    * unnecessary changes to themes/bluemarine/style.css rolled back (the phptemplate bluemarine had an older version of style.css than the one in core)
    * chameleon updated to work with new link scheme (passes links through theme_links)
2005-05-05 07:35:58 +00:00
Dries Buytaert e274f97c87 - Removed the Xtemplate engine and added the PHPTemplate engine.
- Converted the Bluemarine theme from XTemplate to PHPTemplate.
- Moved the the Pushbutton theme and the Xtemplate engine to the contributions repository.
2005-05-04 18:12:18 +00:00
Dries Buytaert a10eac3291 - Patch #21517 by Stefan and TDobes: theme system improvements. 2005-04-30 17:47:57 +00:00
Steven Wittens ea36711d11 - #20910: Centralize print theme page fixes 2005-04-28 19:23:19 +00:00
Dries Buytaert 6fd73703d9 - Patch #21249 by patryk: made SQL query work with PostgreSQL by correcting a 'GROUP BY'-clause. 2005-04-25 17:57:03 +00:00
Dries Buytaert a76a1e1f3f - Patch 20910 by chx: centralize print theme page. 2005-04-24 16:34:36 +00:00
Dries Buytaert 79a5700c57 - Usability improvement: made the markers easier to understand. 2005-04-24 16:22:30 +00:00
Dries Buytaert fa40f24460 - Patch #20235 by chx: fixed problem with db_set_active(). 2005-04-14 18:50:16 +00:00
Dries Buytaert 495a03ae9d - Patch #12794 by assimonds: make sure the node module is optional. 2005-04-13 17:59:39 +00:00
Dries Buytaert b43a782b61 - Removed some dead code. 2005-04-12 16:55:11 +00:00
Steven Wittens 23bccfd1c8 - #4166: Respect 'access userlist' permission for profile data. 2005-04-11 22:48:27 +00:00
Dries Buytaert e3d62d907b - Patch #19298 by Jeremy: loose caching!
Drupal's existing caching mechanism doesn't perform well on highly dynamic websites in which the cache is flushed frequently. One example is a site that is under attack by a spambot that is posting spam comments every few seconds, causing all cached pages to be flushed every few seconds.  Loose caching immediately flushes the cache only for specific users who have modified cached data (whether or not they are logged in), delaying the flushing of data for other users by several minutes.

(I rewrote the help text a bit and made minor changes to the code comments.)
2005-04-11 19:05:52 +00:00
Steven Wittens 230db1039a - Missing check_url() in form(). 2005-04-10 10:22:40 +00:00
Dries Buytaert 47f1f7f90a - Patch #19609 by Daniel: fix problem with database prefixing 2005-04-08 14:24:03 +00:00
Dries Buytaert 67f7d6947e - Fixed bug #19868: undefined variable. 2005-04-08 11:24:46 +00:00
Steven Wittens 0f41706acc - #19874: Fix aggregator escaping after check_plain bug
- Fix bug in decode_entities() with double-escaped entities.
2005-04-07 22:46:55 +00:00
Dries Buytaert 6ba8f32cca - Patch #13503 by chx: made the menu cache locale aware. 2005-04-07 20:00:48 +00:00
Dries Buytaert 97bfa01725 - Patch #18828 by me, jbond and TDobes: moves the textarea hook for 'pre' between the title and the textarea. This makes it easier for simply textarea enhancements like quicktags to add a toolbar just above the textarea. 2005-04-06 07:43:10 +00:00
Dries Buytaert 18e852e4e7 - Patch #19933 by willmoy: stop output buffering once the page has been rendered. 2005-04-05 19:00:24 +00:00
Dries Buytaert 69a066c4cd - Patch #19895 by Moshe: currently modules can inadvertently load all other modules during the bootstrap. this is easy to do by calling a node_load() or module_invoke_all(). this degrades performance for anonymous users when caching is enabled. With this patch, the module writer will see an php error like "Call to undefined function: drupal_set_html_head()" if this is attempted. basically, unavailable functions are actually reported as unavailable. 2005-04-03 08:03:18 +00:00
Steven Wittens d48351a027 - #19873: drupal_specialchars -> check_plain 2005-04-02 18:22:17 +00:00
Dries Buytaert 7bdcba1720 - Patch #19739 by Uwe: corrected many typo's in the documentation and code comments 2005-03-31 21:18:08 +00:00
Steven Wittens be14203534 - #18817: Clean up plain-text checking (see drupal-devel!) 2005-03-31 09:25:33 +00:00
Dries Buytaert 99233a9c99 - Patch #19590 by Moshe: lazy initialization of the theme system. Improves
performance of pages that don't need the theme system (such as RSS feeds)
  and makes it easier to set a custom theme.
2005-03-29 21:01:47 +00:00
Steven Wittens ab4261dc31 - #19517: Fix GD2 toolkit error.
- Tweak code style.
2005-03-29 00:01:23 +00:00
Dries Buytaert f514f55112 - Patch #18700 by Stefan and James: removed GD1 calls, improved error/status reporting, etc. 2005-03-23 20:26:21 +00:00
Dries Buytaert 6957d7863d - Patch #19212 by chx: removed unused variables, and fixed the error reporting
in form_file().
2005-03-21 19:26:47 +00:00
Steven Wittens f60da5b071 - #19130: Handle trailing dot in hostname when scanning for config. 2005-03-19 01:24:18 +00:00
Steven Wittens 98c2d5b2b8 - #5900: Fix browser caching issues. 2005-03-18 09:13:55 +00:00
Steven Wittens 0a984f2c2b - #18597: Resolve conflict in column name between queue.module and poll.module. 2005-03-18 07:34:07 +00:00
Dries Buytaert 97ae6568e6 - Patch #13738 by TDobes: theme system fixes:
* Fix a bug which would cause the "configure" link for styles to be broken.
* Fix a bug with using drupal_get_filename for theme engines. Although this is not called anywhere in core, we should still fix it for contrib. (i.e. themes that may want to manually invoke a theme engine to create a hybrid theme)
* Correct an inaccurate comment in theme.inc
* Populate the default primary links with an "edit primary links" link for consistency with the secondary links
* remove some unnecessary variables in the theme administration which had misleading and confusing names
* replace time-consuming foreach when rendering theme admin page with a more efficient array_key_exists
* usability: rather than completely removing the search box checkbox when search.module is disabled, simply disable it. (UI elements shouldn't appear/disappear.)
2005-03-16 19:41:12 +00:00
Dries Buytaert 7dbce6f402 - Removed . We'll reintroduce it when really necessary. 2005-03-08 22:10:26 +00:00
Dries Buytaert 3becbd8997 - Patch #16914 by chx: avoid that putting a .theme file directly in './themes'
breaks your Drupal.  Only themes in './themes/subdir' are picked up now.
2005-03-08 22:06:11 +00:00
Dries Buytaert 42a085c8ad - Patch #18437 by Mathias: Drupal doesn't allow URL aliases that map to Userland Manila posts since they usually contain the '$' and are considered an invalid URL. This patch allows '$' in an URL and thus an alias. It also resolves a disparity between the 'allowable characters' of absolute and relative URLs. As far as I can tell, those parts of the regexp should be the same. 2005-03-06 06:57:58 +00:00
Steven Wittens 198ec98f75 #18329: Unify confirmation messages (and make them themable) 2005-03-03 20:51:27 +00:00
Dries Buytaert f7b8f53577 - Ignore PHP5's strict warnings for now. The real solution is to rewrite both xmlrpc.inc and xtemplate.inc. 2005-03-03 20:13:20 +00:00
Steven Wittens 36aaecd27e - Moving comment 2005-03-03 20:08:02 +00:00
Steven Wittens e68280064e - #18319: Move encoding conversion out of drupal_xml_parser_create() so it can be used by modules. 2005-03-03 20:06:42 +00:00
Dries Buytaert 456fd7cc85 - Patch #17770 by chx: fixed module_invoke() and module_invoke_all() not to use NULL defaults (bugfix) + removed the limitation on the number of paramaters that can be used. 2005-03-01 20:23:35 +00:00
Dries Buytaert 2ba1d5bbcc - Simplified the session code (PostgreSQL update). 2005-03-01 20:15:10 +00:00
Steven Wittens 365930732d - Missing '>' (reported by Goba) 2005-03-01 18:45:38 +00:00
Steven Wittens ff386b90bb #17747: PGSQL improvements 2005-02-28 18:00:59 +00:00
Dries Buytaert 2b6d4c566e - Patch #17869: make local tasks more themeable. 2005-02-28 16:23:27 +00:00
Dries Buytaert 1e15bed312 - Patch #17687 by Gerhard: removed some cruft. 2005-02-21 19:47:44 +00:00
Steven Wittens e9f14b70d2 #17477: Remove dependency on GD for avatar uploading. 2005-02-21 04:16:46 +00:00
Steven Wittens bb08146c67 - Fixing broken search after sql rewrite patches
- Minor code style fixes.
2005-02-19 22:24:24 +00:00
Steven Wittens a5b8a0a8fb - Removing dead variable 2005-02-09 17:33:53 +00:00
Steven Wittens 7c6a787295 - #16111: bad quotes in db_rewrite_sql 2005-02-05 00:12:24 +00:00
Steven Wittens 7fe195a07e - PHP5 fix due object references: node previewing should not put node output into form. 2005-02-04 20:14:05 +00:00
Dries Buytaert fbec279e4c - Patch #16246 by Moshe: added mechanism to direct the user back to the referring page after completing a form.
(Moshe: the patch against node.module failed to apply.)
2005-02-01 19:45:58 +00:00
Dries Buytaert 7ccc5a6b1b - Patch #16358 by James: added toolkit to enable better image handling. The avatar code and the upload module have been updated to take advantage of the new image API.
There are 5 main functions that modules may now utilize to handle images:

* image_get_info() - this function checks a file.  If it exists and is a valid image file, it will return an array containing things like the pixel dimensions of the image, plus the 'type' and common extension.
* image_scale - resizes a given image to fit within a given width / height dimensions, while maintaining aspect ratio (not distorting the image).  This function can be used to generate thumbnails, or ensure a maximum resolution, etc.
* image_resize - similar to image_scale (but will not respect aspect ratio - may well distort the image).
* image_rotate - rotate an image by X degrees
* image_crop - crops an image to a given rectangle (defined as top-left x/y coordinates plus a width & height of the rectangle).

Contribution modules will now be able to rely on these base manipulation functions to offer additional functionality (such as image nodes, photo galleries, advanced image manipulation, etc).
2005-02-01 16:27:43 +00:00
Dries Buytaert 7931c778d7 - Patch #16513 by James (slightly modified): export categories and enclosures to RSS feeds (and made RSS feeds extensible).
NOTE: this needs to be documented.
2005-02-01 14:09:31 +00:00
Dries Buytaert 171de5d46d - Patch #16303 by Gerhard: fixed PHP notices. 2005-01-31 21:36:37 +00:00
Dries Buytaert 96c039680a - Patch #16111 by chx: fixed some bugs in the db_rewrite_sql() code. 2005-01-31 20:45:10 +00:00
Dries Buytaert b176382d23 - Patch #16111 by chx: PHPdoc/documentation improvements. 2005-01-30 17:48:52 +00:00
Dries Buytaert 59c2208ea6 - Patch #16253 by Goba: incremental improvements to the new content markers.
Goba: it would be nice if one of the core themes would showcase this functionality. ;-)
2005-01-30 09:53:19 +00:00
Dries Buytaert 993ea0c6c5 - Patch #16111 by chx: generalized node_rewrite_query to db_rewrite_query. 2005-01-29 22:02:37 +00:00
Dries Buytaert b24a4bda34 - Patch by Remco: <div> -> </div>. 2005-01-28 18:44:17 +00:00
Dries Buytaert b5a72f6216 - Patch by Jeremy: fixed unclosed " 2005-01-27 19:01:01 +00:00
Dries Buytaert 6e30ba6874 - Patch by Jeremy: made the diffs more meaningful. 2005-01-27 15:53:58 +00:00
Dries Buytaert 8618346133 - Patch #16273 by Jeremy: improved the themability of the pager. 2005-01-27 14:30:33 +00:00
Dries Buytaert 467dbdc4a1 - Patch #16253 by Goba: this simple and straightforward patch adds the ability to define different types of markers (while retaining the old default behaviour of the new and required markers to look the same). Someone with enough time on his hands might be able to partition the new marker to a real new marker and a changed marker (since node_is_new() returns TRUE even if nodes changed, and not only when they are new). This is the base on which the new patch can be worked though. 2005-01-27 12:57:08 +00:00
Dries Buytaert 173f528f59 - Modified patch #14170 by Neil: improved default workflow (default node type) configuration page.
Modified the patch to remove some redundant code, to translate strings, and to better use the menu system.
2005-01-24 21:20:16 +00:00
Dries Buytaert 7988f875a9 - Fixed PHP5 warning: the $result object in drupal_http_request() needed to be properly initialized using 'new StdClass'.
(I just installed PHP 5.0.3, no less.  Why don't you?)
2005-01-22 11:15:24 +00:00
Dries Buytaert 42e7e7d519 - Small clean-up: '>= 1' => '> 0' => ''. 2005-01-22 09:10:59 +00:00
Dries Buytaert df3b371853 - Patch #15976 by Neil: if one single admin modifiable menu item is added then it is not put in the menu table because the comparison is > 1 instead of > 0. 2005-01-22 09:09:06 +00:00
Dries Buytaert 24a68b209c - Patch #9477 by JonBob: improved handling of user-specified paths. 2005-01-19 21:57:58 +00:00
Steven Wittens a1579a3aee - Reversing bad commit, sorry everyone. 2005-01-17 18:56:11 +00:00
Steven Wittens b45bd13d44 - Various code style fixes 2005-01-17 00:41:35 +00:00
Dries Buytaert 971a0e24aa - Patch #14731 by chx: made it possible to rewrite node queries. 2005-01-16 18:44:49 +00:00
Steven Wittens beada9364d Remove left-overs from admin.module. 2005-01-14 17:30:00 +00:00
Dries Buytaert e7777956f9 - Watchdog improvement: added a 'view' link for 'access denied' messages. 2005-01-10 20:25:34 +00:00
Dries Buytaert f4132656b1 - Patch #15399 by adschar: fixed PHP5 error when a new session is inserted into the session table. (Better fix.) 2005-01-10 19:36:21 +00:00
Dries Buytaert 2e5f82c1e1 - Patch #15399 by adschar: fixed PHP5 error when a new session is inserted into the session table. 2005-01-10 19:33:23 +00:00
Steven Wittens 20b0e9d05d #15347: PHP5 typecasting error 2005-01-09 09:58:33 +00:00
Dries Buytaert 64b100d19a - Patch #13260 by UnConeD: watchdog module improvements.
We added a 'severity' column to watchdog():
    watchdog($type, $message, $link) --> watchdog($type, $message, $severity, $link);

    * Specify a severity in case you are reporting a warning or error.
    * The $link-parameter is now the fourth parameter instead of the third.

  TODO: document this in the upgrade guide.
2005-01-09 09:22:40 +00:00
Dries Buytaert 61783651ed - Patch #15254: removed hardcoded 'public' schema from the PostgreSQL backend. 2005-01-07 19:18:05 +00:00
Dries Buytaert 828be2ad61 - Patch #13020 by chx: let Drupal handle multiple database layers.
- Removed the PEAR database backend.  It's no longer being used/maintained.
2004-12-30 13:13:22 +00:00
Dries Buytaert bc9aeff7dd - Patch #14890: corrected the documentation of conf_init(). 2004-12-29 19:56:25 +00:00
Dries Buytaert 0fb0a93965 - Improved the input checking. 2004-12-28 11:04:24 +00:00
Steven Wittens 7132e7d528 #14757: Fix XSS vulnerability due to entity usage. 2004-12-25 14:57:39 +00:00
Dries Buytaert 2b17b3a966 - Patch #13907 by Neil: less ways to set the page title.
* Less logic in theme code.
   * Encourages use of the menu system.
   * Easier to find where a title or breadcrumb comes from in other people's code because there are less places to look. Look in menu and then grep for the appropriate set function. Looking for calls to theme_page() is hard because there are too many of them.
   * Very slightly more efficient.
2004-12-15 21:19:42 +00:00
Dries Buytaert 60352821bf - Refactored the queue module: removed the queue module's field from the node table. With help from Gerhard.
- Slight addition to INSTALL.txt with regard to PHP versions.

- Updated/reworded some node type descriptions as per Boris' suggestions.

- Adding missing {} around a table name in update.php.
2004-12-07 16:55:38 +00:00
Steven Wittens 01d216018f Pager_query's count query was broken if no query arguments were given. 2004-12-06 11:57:04 +00:00
Dries Buytaert cbf3f21e42 - Patch by Steven: fixed bug in pager_query(). 2004-12-04 17:22:08 +00:00
Dries Buytaert 6a95a00259 - Patch #7058 by Neil: format_date does not properly handle escaped characters. 2004-12-03 20:38:22 +00:00
Steven Wittens b70378be00 Fix for pager_query() after #13581 (array of query arguments). 2004-12-02 07:06:33 +00:00
Dries Buytaert cc508ad2f0 - Patch 13738 by TDobes: there was a major theming issue I missed in my bug-testing after the multi-site patch landed. Styles now seem to have their description field filled with the filename of their parent theme/template rather than the theme_key of the parent. This is a problem because init_theme still expected to see the theme_key and therefore dropped back to the base theme (no theme at all). 2004-12-01 22:41:19 +00:00
Dries Buytaert 3cd9a1b2d4 - Patch #13405 by Moshe: make you actually do something useful with the init hook. A recent patch to 4.5 and HEAD made this patch run too early in the request (for non-cached pages). 2004-12-01 22:16:50 +00:00
Dries Buytaert 95610bdd6c - Patch #13647 by Goba:
1. Fixed broken watchdog calls: two watchdog calls omitted the type parameter, and thus injected logs into the type field, instead of the message field.
   2. Removed t() functions from user contributed content.
2004-11-29 17:52:35 +00:00
Dries Buytaert 29337ad8bb - Patch #13581 by Steven: Db_query() allows a variable amount of parameters so you can pass the query arguments in. There is however an alternative syntax: instead of passing the query arguments as function arguments, you can also pass a single array with the query arguments in it. For example the following two statements are equivalent:
db_query($query, $a, $b, $c);
db_query($query, array($a, $b, $c));

This usage is particularly interesting when the query is constructed dynamically, and the amount of arguments to pass varies. In that case we use the second method to avoid using call_user_func_array(). This behaviour is not documented explicitly, but it is used in several places.

However, db_query_range() and pager_query() do not support this syntax properly, which means there are several pieces of code which still revert to the ugly call_user_func_array() call.

This patch updates db_query_range() and pager_query() so they support the array-passing method. I also added documentation about this method to each of the db functions.

I also cleaned up the code for db_query (it was weird and hard to understand) and moved db_query() and db_queryd() from database.xxxxx.inc to database.inc: it was the same between both mysql and pgsql, as it doesn't do anything database specific. It just prefixes the tables and inserts the arguments. The actual db query is performed in _db_query(), which is still in database.xxxxx.inc.

Finally, I updated several places with the new syntax, and the code is a lot cleaner. For example:
- array_unshift($params, "SELECT u.* FROM {users} u WHERE $query u.status < 3");
- $params[] = 0;
- $params[] = 1;
- $result = call_user_func_array('db_query_range', $params);
+ $result = db_query_range("SELECT u.* FROM {users} u WHERE $query u.status < 3", $params, 0, 1);

and

- return call_user_func_array('db_query_range', array_merge(array($query), $args, array((int)$pager_from_array[$element], (int)$limit)));
+ return db_query_range($query, $args, (int)$pager_from_array[$element], (int)$limit);

I've tested it on mysql. I didn't alter the actual db behaviour, so pgsql should be okay too.

This patch is important because many people avoid the call_user_func_array() method and put data directly into the db query.  This is very, very bad because the database prefix will be applied to it, and strip out braces. It's also generally bad form as you have to call check_query() yourself.  With the new, documented syntax, there is no more excuse to put data directly in the query.
2004-11-29 13:13:29 +00:00
Dries Buytaert 70fcf51e84 - Refactored the statistics and watchdog module (views). The most important
changes are:

  1. Simplified the statistics pages: there are less pages and on the
     remaining pages there is a lot less visual clutter (less columns and
     better presentation).

  2. Reorganized the 'administer - logs' menu: flattened the menu structure
     and removed a number of links.

  3. Improved performance.  Most statistics pages used about 160 slow SQL
     queries which made the statistics pages fairly unusable on my system.
     The new pages use at least 10 times less SQL queries and render much
     faster.  They are actually usable.

  4. There is now a 'track'-tab on node pages, and a second subtrab on the
     user accounts 'track'-tab for people with the 'access statistics'
     permission.  They can be used to resp. track the node and the user.
     This makes the statistics more accessible.

  5. Changed the way watchdog messages are filtered.  This makes it easier
     to introduce new watchdog types.

  6. Reworked the statistics module's permissions.

  7. Less code: 223 insertions(+), 343 deletions(-).

  8. Fixed several glitches: for example, the statistics pages sorted the
     'Name' column by user ID instead of by name.  Unfortunately, it is
     too difficult to backport these to DRUPAL-4-5.

  TODO:

  1. Review the statistics modules help pages.

  2. Help fine-tune the interfaces/views.

  NOTES:

  1. You'll want to run update.php.
2004-11-28 12:28:35 +00:00
Dries Buytaert 76eace311e - Usability improvement: only display subtabs if there is more than one subtab. If there is only one, make sure it is the set to be the default subtab and all is well. 2004-11-28 12:03:11 +00:00
Dries Buytaert 5d0dfeb562 - Patch #13405 by Moshe:
+ Make bootstrap functionality work with HEAD.
   + Move functions into bootstrap.inc so that statistics_exit() works for cached pages.  (Does this close any issues?)
2004-11-25 06:14:59 +00:00
Dries Buytaert 4e4e2aa777 - Patch #13443 by Moshe: got rid of the semi-implemented 'page link' feature. All themes currently support primary and secondary links so page links are now deprecated. Check your contributed modules and update them accordingly. 2004-11-24 22:50:25 +00:00
Dries Buytaert 5d759ccbb9 - Patch #5942 by jhriggs and Adrian:
+ added support for multi-site configurations.
    + tidied up some old cruft and added code comments.
2004-11-24 22:44:01 +00:00
Dries Buytaert 30110a8770 - Patch #6166 by Moshe: node preview should not display links. Push the links to the theme instead of the theme having to pull them in using node_link().
TODO:
    1. Update theme upgrade instructions in the handbook: node_link() is gone.
    2. Remove page_link() just like we removed node_link().
2004-11-23 23:11:59 +00:00
Dries Buytaert b442fad027 - Patch #13263 and #13265 by arnab: added word-based truncation and made the comment module use it to extract subjects. 2004-11-21 20:17:44 +00:00
Dries Buytaert fa97839088 - Patch 13180 by chx: renamed check_query() to db_escape_string() and implemtented it properly per database backend.
Read the manual for pg_escape_string:  "Use of this function is recommended instead of addslashes()." Or read sqlite_escape_string: "addslashes() should NOT be used to quote your strings for SQLite queries; it will lead to strange results when retrieving your data."
2004-11-21 08:25:17 +00:00
Dries Buytaert dba51ebbf0 - Patch #13121 by Goba: valid_url() should allow the use of '+' in URLs. 2004-11-18 19:57:39 +00:00
Dries Buytaert 9bf33e5ac8 - Added generic flood control mechanism to throttle certain operations per hostname (eg. posting comments, requesting passwords, sending e-mails). See flood_register_event() and flood_is_allowed() for details. 2004-11-15 21:17:25 +00:00
Dries Buytaert 918d33f41f - Modified patch #7235: do a better job checking the OS and acting upon it. 2004-11-15 12:04:44 +00:00
Dries Buytaert c0ea04814a - Removed some cruft. 2004-11-15 12:00:32 +00:00