Commit Graph

567 Commits (a448f5a9b46c5a5e5bcd64072a420bef33161a44)

Author SHA1 Message Date
Dries Buytaert 53321bafae - Patch by Kjartan:
+ Pager is not generated when there are less results than the limit.
   + Fixes ugly blank rows in administration pages when there is just one
     page.
2003-03-12 20:45:24 +00:00
Kjartan Mannes 54ea2de9f3 - Adding $Id$ keyword. 2003-03-12 09:51:30 +00:00
Dries Buytaert 7a88330d9d - Committed slightly modified version of Kjartan's theme.inc patch: Drupal
will now barf when trying to instantiate a non-existing theme class.
  This should help to identify broken themes, and to track down theme system
  related bugs.
2003-03-11 23:08:01 +00:00
Kjartan Mannes c4cf16dd3d - Removing drupal module from the always loaded modules (again). 2003-03-09 17:28:51 +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
Dries Buytaert 41ac56a4be - Bugfix: transparent session ID handling wasn't working properly with
drupal_goto().  Patch by Al.
2003-02-27 22:52:08 +00:00
Dries Buytaert f21742c772 - Patch by Ax: "The $block->path setting, which <cite>lets you define regular expressions to specify on which pages you want the specific blocks to be shown</cite> [1], has been disfunctional for some time (did it ever work at all?). one reason was the magic_quotes_gpc / stripslashes issue [2] - luckily, this got solved today. the other reason is a buggy implementation that a) compares the path to $PHP_SELF (which is the script name only, without any url params like "?op=view&id=13"; in the case of clean urls, worse, it is index.php always ...) instead of request_uri() (which does have these params and the proper value), and b) doesn't properly escape the regexp delimiter character in the expression ("/back\/slash/")." 2003-02-27 22:48:32 +00:00
Dries Buytaert 6f6561a8b2 - Fixed some spelling mistakes. Patch by Al. 2003-02-27 22:45:00 +00:00
Dries Buytaert 8ae2520965 - Removed stripslashes(). See http://lists.drupal.org/pipermail/drupal-devel/2003-February/022233.html. Patch by Ax. 2003-02-26 22:02:46 +00:00
Dries Buytaert cff898ffdb - Fixed bug when an additional parameter is being passed to the callback.
Patch by Zbynek.

- Made the menu_tree() function emit CSS tags to identify which menus are
  expanded/collapsed/leafs.  Patch Zbynek and Al Maw.
2003-02-25 19:48:55 +00:00
Dries Buytaert 277ceae515 - New menu houskeeping. Prototyped by Zbynek.
The following modules need updating:
    * glossary module
    * feed module (Breyten's version)
    * mailhandler module
    * notify module
    * project module
    * smileys module
    * admin module
    * style module
    * taxonomy_dhtml module

  To avoid unexpected problems menu_add() is deprecated (it will print an
  error message when used) and menu() should be used instead.
2003-02-20 22:44:51 +00:00
Dries Buytaert 8f190d131b - Documented the fact that the $base_url should not have a trailing slash.
Requested by Kjartan.

- Fixed at least 3 typos.
2003-02-15 21:49:17 +00:00
Dries Buytaert a7a323e702 - Made sure clean URLs are disabled by default. Reported by Moshe. 2003-02-15 17:15:48 +00:00
Dries Buytaert d038729797 - Clean URLs. 2003-02-14 19:52:45 +00:00
Kjartan Mannes 32989e14db - Fixed blog.module to accept blog/name URLs as well as blog/id
- Changed the RewriteRule in .htaccess.
- Fixed form_select() matching incorrectly.
- Added missing $Id$ to menu.inc
2003-02-12 21:37:56 +00:00
Dries Buytaert 074b9bf421 - Added temporary check around inclusion of "xmlrpc.inc". 2003-02-12 16:21:48 +00:00
Dries Buytaert e90f3b883b - See http://lists.drupal.org/pipermail/drupal-devel/2003-February/021824.html. 2003-02-11 20:01:17 +00:00
Dries Buytaert 9281d0cdd7 - Applied Alastair's date patch.
- Removed all instances of '$user->nodes'.

- Committed Moshe's taxonomy patch - minus the node_compact_list() bit.  It needs a bit more thought/work.  This patch changes the links of taxonomy pages/feeds so update your custom code and themes accordingly!

Themes should now use "taxonomy_link("taxonomy terms", $node)" to get an array of taxonomy term links.  The old construct is deprecated and should be changed.

// old theme blob:
if (function_exists("taxonomy_node_get_terms")) {
  foreach (taxonomy_node_get_terms($node->nid) as $term) {
    $terms[] = l($term->name, NULL, array(), "or=$term->tid");
  }
}

// new theme blob:
if (module_exist("taxonomy")) {
  $terms = taxonomy_link("taxonomy terms", $node);
}

// old URL:
http://foo.com/index.php?or=1,2

// new URL:
http://foo.com/?q=taxonomy/page/or/1,2
2003-02-09 17:39:40 +00:00
Dries Buytaert e4ff410614 - Patch by Moshe: sometimes modules display content composed by people who
are not members of the site. Two examples are listhandler and import modules.
There is no easy way for these modules to display the true author of the
content. Usually, the content appears as if authored by Anonymous User. This
3 line patch enables modules to override the author name in their _view() hook.
2003-02-02 10:13:13 +00:00
Dries Buytaert cfd31c93f1 Patch by Ax:
- Bad usage of css ID's: they may be used for a single element only,
but were used as #node, #block, which can occur multiple times in a
single page.

- Moved HTML from theme to template - thats what templates are all
about!

- Added support for head() hook

- Added support for diffentiating between boxes and blocks.

- Typo: secundary -> secondary
2003-02-01 19:54:19 +00:00
Dries Buytaert bb9f9868eb - Committed Alastair Tse's getallheaders() patch. 2003-01-31 08:32:41 +00:00
Dries Buytaert 4088adad1a - Fixed bug introduced by Moshe's common.inc patch; posting content would
cause "Array" to be displayed.
2003-01-27 19:37:07 +00:00
Dries Buytaert 92b5fc369a - Fixed XHTML glitch in the sitemap. Thanks Moshe and Michael. 2003-01-27 19:15:20 +00:00
Dries Buytaert a32e3d1408 - Added sitemap feature to administration pages. Requested by various
people including Michael and Moshe.
2003-01-26 13:27:59 +00:00
Dries Buytaert 4028362fda - Applied Moshe's _exit patch (slightly modified).
- Fixed bug in system.module.
2003-01-26 13:22:02 +00:00
Dries Buytaert 4dac201e7c - Patch by Ulf: XHTML-ified the code. 2003-01-21 22:57:43 +00:00
Dries Buytaert 9a23223e25 - Applied Ori's format_plural() patch; see mailing list for details.
NOTE: some modules in the contributions repository might need to be updated.
2003-01-21 22:44:25 +00:00
Dries Buytaert 389dc00886 - Replaced "&" by "&amp;". Patch by Ulf. 2003-01-20 19:54:11 +00:00
Dries Buytaert 5b1e1da22e - Tidied up a SQL query.
- Changed a "&" to a "&amp;".
2003-01-20 19:20:22 +00:00
Dries Buytaert f6da12ca19 Patch by Marco:
- forum: fixed link to new topic
- forum: new topic shows default forum correctly
- forum: first_new is back; the anchor didn't consider multiple pages
- forum: use standard pager, needed some changes/fixes to pager.inc
- forum: some cleanup
- forum: taxonomy hook
- renamed first_new to simply new
- added an optional parameter to pager_query for the count query
- used the optional count param for paging forum topics
- internal change: moving a topic doesn't duplicate the node anymore but just
  changes the forum (term); no change in functionality, and shadow still
  works (suggested by Dries).  This probably also made some queries somewhat
  lighter.
- bug fixed: anonymous users always saw "n (n new)" in the replies column
- updated pager help and moved from _help to phpdoc
2003-01-15 23:01:42 +00:00
Dries Buytaert 6f15124748 - Enabled XML-RPC. 2003-01-15 05:57:55 +00:00
Dries Buytaert e25bc4fda3 - Fixed glitch in table_cell(). Spotted by Michael. 2003-01-15 05:56:50 +00:00
Dries Buytaert d268783669 - Small improvement to the admin menu based on feedback from Michael. 2003-01-14 20:33:42 +00:00
Dries Buytaert 7d677b5c5a - Added some more URL rewrite rules based on contributions from Gerhard. 2003-01-12 11:53:31 +00:00
Dries Buytaert d1521b48e5 - Rewrite old-style URLs. Based on patch by Gerhard. 2003-01-11 20:07:42 +00:00
Dries Buytaert 0d384c8ead - Fixed "clean URL" glitch in queue module. Patch by Ax.
- Small improvement to url().  Patch by Ax.
2003-01-11 10:46:11 +00:00
Dries Buytaert 640128b08d - Added some isset()s to kill some "Undefined variable" warnings. Patch by
Julio.
2003-01-09 20:06:00 +00:00
Dries Buytaert 6744e34066 - Fixed the pager. It might not be 100% correct, but it will work in 95%
of the cases.
2003-01-09 19:53:51 +00:00
Dries Buytaert 28aa217f90 - Made sure the $links array is properly initialized before doing an
array_merge.  According to Ori, this fixes a problem when using PHP
  as an ISAPI module with the Sambar server.
2003-01-08 05:47:57 +00:00
Dries Buytaert affacdf508 - Added a few line breaks in the HTML emitted by the table() function
for better readability of the HTML code.  Patch by Moshe.
2003-01-07 19:21:28 +00:00
Dries Buytaert 56d0434f82 - Fixed bug in update of taxonomy links. 2003-01-06 21:43:07 +00:00
Dries Buytaert 2647a943f0 - Forgot to update the taxonomy links. Reported by Adam. 2003-01-06 21:24:21 +00:00
Dries Buytaert a380356d6e - Fixed typo in watchdog(). Reported by Marco. 2003-01-06 20:58:31 +00:00
Dries Buytaert 89b2069e4d - Clean URL patch. 2003-01-06 19:51:01 +00:00
Steven Wittens 97858f9b2e Typo ('tat' > 'that') 2003-01-05 01:19:37 +00:00
Dries Buytaert 8a63646576 - Added an extra parameter to watchdog() which lets you specifiy an "action"
or "operation" link.

- Made the main page of the administration section show an overview of all
  watchdog entries with such action link.

- Fixed typo in PostgreSQL database scheme.
2003-01-04 11:03:15 +00:00
Dries Buytaert de95001c92 - Tidied up the use of check_output(). Might make rendering pages a bit
snappier (performance improvement).
2002-12-31 12:34:07 +00:00
Dries Buytaert 92758279fa - Bugfix: wrapped an RSS item's description in a check_output() to ensure
proper markup.
2002-12-31 10:58:47 +00:00
Dries Buytaert e97c6a73d6 - Code improvement: menu_tree() will no longer generate empty "<ul></ul>"
constructs.
2002-12-30 15:54:06 +00:00
Dries Buytaert 769ebb666c - Check input given to table rendering functions to avoid warning. 2002-12-30 08:33:02 +00:00
Dries Buytaert 14158fbc6b - Added table rendering functions. As an example, I changed the node module
to take advantage of it.
2002-12-29 12:03:08 +00:00
Dries Buytaert a3ad12a9b6 - We don't have to show the main row anymore. 2002-12-27 14:58:57 +00:00
Dries Buytaert 26e0b9b75c - Made Drupal report an error when magic_quotes are disabled. 2002-12-26 12:16:09 +00:00
Dries Buytaert 22fa9ed70a - Refactored the administration pages. 2002-12-24 15:40:32 +00:00
Dries Buytaert 8f673be382 - Small improvement. Patch by Moshe. 2002-12-21 19:10:47 +00:00
Dries Buytaert 20e22ad292 - Removed some backslashes. Reported by Adam. 2002-12-20 22:08:17 +00:00
Dries Buytaert 146beb5156 - Fixed bug in cache_clear_all(). Patch by Marco. 2002-12-16 16:42:49 +00:00
Dries Buytaert eacfd45863 - Forgot a tag. 2002-12-15 23:05:25 +00:00
Dries Buytaert 99d84c9330 - Committed Marco's pager improvements.
- Fixed another annoyance with editing content.
2002-12-14 11:55:54 +00:00
Dries Buytaert b6b24c28e0 Applied patch by Natrak:
- page_header() now adds Last-Modified and ETag http headers.
- When running PHP as an Apache module page_header() will check the HTTP
  headers for conditional gets, and will only push the content when it
  fails. (Works for html and xml pages as they are all cached). Note:
  this is a PHP limitation, so until PHP makes it work for other web
  servers this won't work for them.
- Added created field to cache database to hold the timestamp when the
  cache was created.
- Changed cache_get() to return an object with ->data and ->created.
- Update forum and locale modules.
2002-12-11 22:00:04 +00:00
Dries Buytaert 81a6bcd7a2 - Fixed typo. Reported by Kobus. 2002-12-11 20:21:04 +00:00
Dries Buytaert 7ce686c152 o Permission improvements:
+ Removed the "post content" permission and replaced it by more fine-grained permissions such as "maintain static pages", "maintain personal blog", "maintain stories", etc.

o Usability improvements to teasers:

   + Teaser forms are no more.  Teasers are extracted automatically but can also be instructed using a delimiter "---".  Furthermore, when a post it too short for a teaser, the user won't be bother with teaser stuff anymore.

   + Added an option to set the teaser length, or to disable teasers all together.

   + When previewing a post, both the short (if any) and the full version of a post are shown.  This addresses a common complaint; for example, when writing a book page there was no way you could preview the short version of your post.

   + Forum posts can be teasered now.  This is particularly helpful in the context of drupal.org where we promote forum topics.

o Bugfix: replaced all PHP short tags (<?) with long tags (<?php).

o Bugfix: removed hard-coded dependence on comment module.

o Bugfix: when the queue module was disabled, it was not possible to approve updated book pages.

o Bugfix: applied modified version of Marco's node_teaser() fix.
2002-12-10 20:35:20 +00:00
Dries Buytaert 296a01f399 - Made sure session.cache_limiter is set to "none" as suggested by Moshe
and Ax.
2002-12-08 08:19:29 +00:00
Dries Buytaert 7c187f894c - Added "short_open_tag 1" to the PHP settings. 2002-12-07 21:21:35 +00:00
Dries Buytaert 8a91f1befa - Added some extra information about PHP settings. 2002-12-02 22:18:37 +00:00
Dries Buytaert 060810841b - Patch by Jeremy to fix a module loading bug:
- module.inc:
       + added call to _init for all modules

    - statistics.module:
       + added statistics_init()
       + moved all global actions into statistics_init()
2002-11-29 05:53:40 +00:00
Dries Buytaert 6c862208d8 - Fixed small glitch in drupal_goto(): somethimes a "&" got appended. Patch
by Marco.
2002-11-29 05:45:57 +00:00
Dries Buytaert 51778ef1b3 - Applied Ax's pager patch: includes documentation (rewrote it somewhat) and two
bugfixes; one that makes taxanomy based paging work (eg. index.php?and=2,3)
  and one that kills a warning when the query returns no records.
2002-11-26 19:24:20 +00:00
Dries Buytaert 4a723b9095 - Added some comments/explanation wrt to the "$db_url" settings; this seemed
to cause problems/confusion.
2002-11-26 18:38:01 +00:00
Dries Buytaert 4f94488b55 - SID will now only be appended when session.use_trans_sid is set. Patch
by Kjartan.
2002-11-21 18:25:38 +00:00
Dries Buytaert 36cb350ef1 - Don't display "1" when there is only one page. 2002-11-18 19:21:09 +00:00
Kjartan Mannes 15f1a61197 - changing theme patch. Now Drupal will init the $this->path automatically. 2002-11-17 16:32:03 +00:00
Kjartan Mannes 4d45f0c777 - changing the sorting algorithm in module_list so it is case insensitive. 2002-11-17 16:26:06 +00:00
Dries Buytaert 9e32c2e960 Patch based on work of Kjartan:
- Changed cache API.

- Fixed caching bug in comment.module.  Odd this hasn't been reported yet.

- Fixed caching bug in forum.module.

- Fixed caching bug in system.module.

- Fixed caching bug in block.module.

- Simplified caching support in forum.module thanks to improved cache API.
2002-11-17 06:42:52 +00:00
Kjartan Mannes 64f8781f78 - made the themes path aware. If your theme creates a constructor function it
will now be passed the filename as the first parameter.
2002-11-16 18:06:32 +00:00
Dries Buytaert 99fd26db08 - Small cosmetic change. Patch by Natrak. 2002-11-10 21:16:58 +00:00
Dries Buytaert 6ba38a7eeb - Fixed db_query_range() in PEAR database abstraction layer. Patch by James. 2002-11-09 20:58:16 +00:00
Dries Buytaert 2fc257a076 - Oops. Braino. 2002-11-09 20:50:50 +00:00
Dries Buytaert 3dd7d9b47d - Oops. The db_query_range() query got added twice. 2002-11-09 20:47:52 +00:00
Dries Buytaert 6d1ffea494 - Added check to see whether $items is initiliazed. Thanks James. 2002-11-09 20:12:03 +00:00
Dries Buytaert c93ab2a21f - Added a db_query_range function. Patch by Natrak, slightly modified. 2002-11-09 20:02:41 +00:00
Dries Buytaert a6a47a3257 - Applied Moshe's "theme head" patch:
"This patch to theme.inc adds the ability for modules to insert HTML
   into the <HEAD> section of all web pages. The additional modules in
   this directory [ed: blog.module] demonstate possible uses for the
   new _head() hook."
2002-11-09 16:24:46 +00:00
Dries Buytaert 562df8fe43 * Added Jeremy's pager:
"This is a simple, generic pager for Drupal-CVS.  It is designed to be
  easily themeable and expandable.  The code is highly-commented to
  enhance readability."

 "Pagers are constructed by combining the provided pieces (all of which
  can be easily modified to display the text or image you prefer) into
  your custom pager."

* Statistics module fixes by Jeremy:

 - removed superfluous check for existence of watchdog()
 - saving changes in admin page displays status and returns same page
 - no longer return 1971/01/01 in "view statistics" table
 - switched from "!=" to "<>" in SQL queries for ANSI-SQL compliance
 - switched from "MAX(timestamp) as timestamp" to "MAX(timestamp) as
   max_timestamp" moving towards ANSI-SQL compliance.

* Added a "theme_item_list" function to format itemized lists.  Also
  changed a couple of modules to take advantage of it.  Makes for a
  more consistent UI.
2002-11-09 13:59:36 +00:00
Dries Buytaert b3abbc4b54 Patch by Natrak:
- Modules and themes now use the same functions to find and administer
  files.
- Modules can now be placed in sub-directories.
- Theme descriptions can no longer be edited. This will be handled by
  Dries' theme_conf patch.
- Update required to keep old modules enabled.
2002-11-08 13:19:12 +00:00
Kjartan Mannes 601d34ec31 - removing whitespace (+testing still). 2002-11-06 14:18:45 +00:00
Dries Buytaert 8d103a0898 - Committed Marco's block rewrite:
+ Blocks are not longer called if not rendered: major performance
     improvement.
   + Fixed some bugs (preview option was broken, path option was broken).
   + Removed "ascii"-type blocks.
   + Added permission to for "PHP blocks"
   + ...

  NOTES:

   + You'll want to run "update.php":

       ALTER TABLE blocks DROP remove;
       ALTER TABLE blocks DROP name;

   + You'll want to update your custom modules as well as the modules in
     the contrib repository.  Block function should now read:

       function *_block($op = "list", $delta = 0) {
         if ($op == "list") {
           return array of block infos
         }
         else {
           return subject and content of $delta block
         }
       }
2002-10-26 15:17:26 +00:00
Dries Buytaert 2512ce7697 - Killed a warning. Reported by ax. 2002-10-24 17:44:39 +00:00
Dries Buytaert 1e5813d4f4 - Made it possible to connect to mysql databases running on non-standard
ports.  Patch by Alastair.
2002-10-23 20:09:29 +00:00
Dries Buytaert 66c5b70736 - Wrapped some hardcoded colors in "theme_invoke()"s; we can still create
a drupal_error() later on but I think we better get used to theme_invoke().

- Fixed translation bug.  Patch by Moshe.

- Fixed PHP warning.  Patch by ax.
2002-10-22 18:46:43 +00:00
Kjartan Mannes 7d1c1fcc16 . fixing what I did earlier. Not sure how that happend. 2002-10-20 19:17:17 +00:00
Kjartan Mannes 0b323c0d8a - applying patch from Ax. Bug #389:
"Notice: Undefined variable: conf" in common.inc on line 779
2002-10-20 11:59:34 +00:00