Commit Graph

803 Commits (e57b926e8d4385e399731159bd90f862962a86ab)

Author SHA1 Message Date
Dries Buytaert 864eab75aa - Patch #50105 by chx: simplified some code. 2006-02-19 21:47:50 +00:00
Dries Buytaert 7b71373701 - Patch #44298 by DriesK: prevent unaccessible links from being generated. 2006-02-19 21:46:04 +00:00
Steven Wittens 740dc97b5f - #35073: Admin/node category filter not working 2006-02-14 21:12:09 +00:00
Dries Buytaert 583d5a4ee9 - Patch #48622 by adrian: remove drupal_goto from _submit functions. 2006-02-10 05:25:57 +00:00
Dries Buytaert 51f8d2f33b - Patch #47406 by Zen: menu sorting shouldn't be case insensitive. 2006-02-09 08:36:54 +00:00
Dries Buytaert df492f35ae - Patch #43622 / #46627 by markus: 'delete the selected posts' operation on admin/node doesn't work. 2006-02-09 07:46:04 +00:00
Dries Buytaert 6b706b50b3 - Patch #48564 by JonBob: grammar fix. 2006-02-09 07:16:47 +00:00
Steven Wittens a0454264af - Node revisions 404/403 handling called drupal_not_found() twice. 2006-02-08 00:47:14 +00:00
Dries Buytaert dbdca484c1 - Patch #48021 by Zen: removed unused variable. 2006-02-06 05:54:17 +00:00
Dries Buytaert 514bef01f0 - Patch #46933 by Gerhard: moderated nodes are not indexed. 2006-02-01 14:11:53 +00:00
Dries Buytaert 15ff8c8e32 - Patch #46827 by wulff: fixed incorrect links. 2006-01-29 07:50:45 +00:00
Dries Buytaert 2210b607b0 - Patch #46705 by killes: don't use array_merge. 2006-01-29 07:46:57 +00:00
Dries Buytaert 576399c1f4 - Modified patch #37754 by Thomas: made the status message show up. 2006-01-24 08:26:21 +00:00
Dries Buytaert 8c02d4ec93 - Patch #45530 by Morbus: filter_form shouldn't default to #weight 0
When a form element doesn't specify a #weight, it is assumed internally as #weight 0. However, to ensure that our form elements display visually *as they were defined in the array* we, in form_builder, count the number of elements, divide by 1000, and set that as the weight:

# Assign a decimal placeholder weight to preserve original array order
if (!isset($form[$key]['#weight'])) {
  $form[$key]['#weight'] = $count/1000;
}

The above code will set the #weights of elements that have not defined a weight to something like 0 (first element in array definition), 0.001, 0.002, and so on. However, anytime a form element *explicitly* defines a #weight of 0, that #weight is kept at exactly 0, which would cause that form element to appear BEFORE the elements that didn't have a #weight defined (and thus received a #weight such as 0.002).

Consider the following pseudo example:

$form['game_title'] = array(
    '#type' => 'textfield',
    ...
    );
$form['game_description'] = array(
    '#type' => 'textarea',
    ...
    );
$form['game_format'] = filter_form(variable_get('game_format', NULL));
return $form;

Here, we're not definiing weights on our two textfields. We then add an filter_form. The second parameter of the filter_form is $weight, which defaults to 0. After this $form hits form_builder, we have weights 0 (game_title), 0.001 (game_description), and 0 (filter_form) respectively. This is then sorted by weight, which causes filter_form (the third element in the array) to appear BEFORE game_description (0 is lighter than 0.001).

The short lesson is: explicitly defining #weight 0 for a form element is probably a bad idea. This patch changes the default #weight of filter_form to NULL, instead of 0, and also removes any other explicit setting of #weight to 0 in core.
2006-01-20 09:04:34 +00:00
Dries Buytaert e84a98a22b - Patch #45349 by Morbus Iff: input filters aren't sorting correctly infForms API. 2006-01-19 08:54:41 +00:00
Steven Wittens ecd26ac8ae - #42277: Make node search indexing more robust against bad nodes and timeouts. 2006-01-18 21:31:40 +00:00
Dries Buytaert 2220c03633 - Patch #45206 by markus: attempt at making the node filters somewhat translatable. 2006-01-18 19:09:46 +00:00
Dries Buytaert 46913a7efd - Patch #45259 by chx/drumm: cast to object required. 2006-01-18 14:30:42 +00:00
Dries Buytaert 186ebd18da - Patch #42072 by m3avrck: more improvements to the node revesion overview screen. 2006-01-17 21:19:43 +00:00
Dries Buytaert baaf319c59 - Patch #42072 by m3avrck: improved the revision overview screen. 2006-01-17 19:26:49 +00:00
Dries Buytaert 51d2ac2b9e - Critical feature #40670: made the form array accessible. 2006-01-17 17:42:29 +00:00
Dries Buytaert baa5c2ff89 - Extended the form description for clarity. 2006-01-14 09:51:57 +00:00
Dries Buytaert 7f87b19eeb - Patch #42886 by chx: critical feature: allow modules to be reordered. 2006-01-08 12:49:51 +00:00
Dries Buytaert 859e045db6 - Patch #42955 by Cvbge: critical bugfix: users can't create new content. 2006-01-06 16:21:34 +00:00
Steven Wittens c27b62b182 - #41940: Locale string search broken in some cases (and remove some inappropriate db_escape_string() usage)
- #43491: Missing drupal_goto() after saving settings
2006-01-05 23:35:34 +00:00
Dries Buytaert 9e23a23d73 - Patch #35770 by DriesK: make node preview settings work. 2006-01-04 09:04:27 +00:00
Dries Buytaert db92352671 - Patch #43032 by Steve Dondley: critical fix: can't update nodes by anonymous users. 2006-01-03 19:40:29 +00:00
Dries Buytaert ea2d791095 - Patch 41169 by Chris: got rid of expensvie object 2 array casts. 2005-12-31 10:48:56 +00:00
Steven Wittens 79a193a2d2 - #42234: Use standardized feed icon for RSS 2005-12-29 04:46:40 +00:00
Dries Buytaert 02eb24bfbd - Bug #42107: redirect to the main page instead of to 'node'. 2005-12-27 14:31:42 +00:00
Dries Buytaert ed7256f37a - Patch #28159 by chx: removed some dead code from the search module's form. 2005-12-26 11:21:19 +00:00
Dries Buytaert ba12462fc9 - Patch #42153 by Junyor: slight clean-up of node_revision_delete(). 2005-12-24 13:05:22 +00:00
Dries Buytaert 29a619b598 - Patch #30098 by killes: node revisions should only be viewable by admins. 2005-12-22 10:57:02 +00:00
Steven Wittens c2384e2c18 - #41973: Ensure -\>changed and -\>created are equal on node creation 2005-12-22 00:22:19 +00:00
Steven Wittens 19aad8934f - #34826: Search results don't include last part of longer pages 2005-12-21 14:30:09 +00:00
Dries Buytaert 922a46d281 - Patch #34920 by Morbus/webchick/tangent: fixed order of form fields. 2005-12-15 16:24:40 +00:00
Dries Buytaert 5accfa08f5 - Patch #41133 by DriesK: as of PHP 5.1.0, strtotime() returns FALSE on failure instead of -1.
Changed code to be compatible with all versions.
2005-12-15 16:02:50 +00:00
Dries Buytaert 264f7d5667 - Patch #41211 by Neil: de-dupe XML namespaces in RSS automatically. 2005-12-15 15:57:55 +00:00
Dries Buytaert 764f1177ef - Patch #40631 by Chris Johnson: is_array() slower than isset() or empty(). 2005-12-14 20:10:45 +00:00
Dries Buytaert 7334f7624f - Patch #41165 by Morbus: removed rss doctype. 2005-12-14 19:04:27 +00:00
Dries Buytaert c11080c02e - Patch #41109 by chx: fixed problem with _node_name() returning NULL instead of array() when there are no node types. 2005-12-14 13:26:39 +00:00
Dries Buytaert 2659fadd5f - Patch #40587 by wtanaka: execute -> submit 2005-12-10 08:12:59 +00:00
Dries Buytaert aba547258a - Patch #36429: remove CONCAT() and speed up node_access query. 2005-12-08 15:30:27 +00:00
Dries Buytaert 94d6b9abf0 - Patch #29326 by Morbus: optimized performance of URL aliasing for newly installed sites.
There are a number of small optimizations we could add; like, we should never do more lookup queries than the number of unique URL aliases in the database.  When the size of the static cache equals the number of unique URL aliases in the database, we can stop doing lookups.  I think this could be implemented with a 2-line change.  Takers?
2005-12-07 20:57:45 +00:00
Dries Buytaert 28fdb3975e - Patch #39778 by chx: obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick. 2005-12-05 09:11:33 +00:00
Dries Buytaert 26bd449860 - Patch #39576 by chx: rename '_execute' to '_submit' and '#execute' to '#submit'. 2005-12-02 15:21:01 +00:00
Steven Wittens b9415b4b9c - #7940: Remember publishing options when editing node 2005-11-29 03:18:57 +00:00
Dries Buytaert c647b39c2c - Patch #37798 by Neil: fixed problem with node settings. 2005-11-27 11:11:46 +00:00
Dries Buytaert b1b1e2045f - Patch #37798 by Neil: allow non-workflow form elements on the node type settings page. 2005-11-25 10:11:59 +00:00
Steven Wittens 02d7e96309 - #35142: Fix mass delete 2005-11-24 22:03:40 +00:00
Dries Buytaert 12c5416dbf - Patch #38593 by malex: generate 'guid' in RSS feeds to work around some aggregator glitches. 2005-11-24 20:15:09 +00:00
Dries Buytaert d4692d569c - Patch #35644 by webchick: fixed the sizes of the textareas on the node edit forms. 2005-11-23 16:18:28 +00:00
Dries Buytaert 03dda45573 - Patch #37752 by chx and Richard: renamed #post_process to #after_build. 2005-11-21 18:10:26 +00:00
Dries Buytaert 9317291284 - Patch #37926 by asimmonds/chx: fixed previewing nodes. 2005-11-18 14:09:42 +00:00
Dries Buytaert f69503aa58 - Patch #37777 by asimmonds: form_id missing from rendered admin/node form. 2005-11-17 06:48:25 +00:00
Steven Wittens fd6104cf4d #37390: Make welcome text link to admin/settings 2005-11-13 02:43:33 +00:00
Dries Buytaert aeed4cd8e4 - Patch #35644 by webchick: forms API simplificiations. 2005-11-12 11:26:16 +00:00
Steven Wittens 85492ae9a5 #36791: node_validate was called twice 2005-11-12 02:54:13 +00:00
Dries Buytaert b4644f8e66 - Patch #36250 by hunmonk: admin batch delete broken, node_delete needs reworked.
This commit changes the node_delete() API.  A list of affected modules is available at http://drupal.org/node/36250#comment-52963.
2005-11-04 19:40:28 +00:00
Dries Buytaert a8b218827a - Patch #26139 by webchick / Kieran / documentation team: improved admin help of core modules! / 2005-11-01 10:17:34 +00:00
Dries Buytaert ef7d2c8a9f - Patch #34920 by tangent: reorganized the node submission form a bit. 2005-10-28 14:04:20 +00:00
Steven Wittens fe938b844a - #35434: Form API - obsolete $param to hook_form() + preview fixes 2005-10-28 00:28:14 +00:00
Steven Wittens 34fcf45def - #35284: fixing node form 2005-10-26 14:49:59 +00:00
Dries Buytaert 27c619d16f - Patch #35279 by asimmonds: fixed typo in pager code. 2005-10-26 08:06:56 +00:00
Steven Wittens fbaede7ec0 - #35264: More form api fixes 2005-10-26 01:24:09 +00:00
Dries Buytaert f6764cfbd8 - Patch #30930 by m3avrck/deekayen: cured PHP5 warnings. 2005-10-22 15:14:46 +00:00
Steven Wittens 909d6928ac - #28159: Advanced search features (hello from DrupalCon)
Presentation about it:
http://www.acko.net/files/drupal-search-slim.pdf
2005-10-18 14:41:27 +00:00
Steven Wittens 5f0e0f3649 - #33433: More form API fixes, and error handling improvements by Chx. 2005-10-13 10:02:31 +00:00
Dries Buytaert 75fe6b6c0a - Patch #33752 by chx, adrian, et al: another batch of form API changes/fixes. 2005-10-11 19:44:35 +00:00
Dries Buytaert 7863be5e82 - Patch #33433 by chx: fixed a number of form API problems.
* Default form value
    * Leftover debug function in form.inc
    * PHP5 issue with comment date (I got this patch from another issue)
    * Validation error fix (was calling legacy form validate)
    * Lots o' warnings on comment preview
    * Filter tips plus argument (gremlins. I swear this was not there.)
    * Message to clear what's going on with system settings
    * Non-freetagging taxonomies fixed
2005-10-08 12:21:47 +00:00
Dries Buytaert a1ae4da70b - Removing tabs and trailing whitespaces. 2005-10-07 06:51:43 +00:00
Dries Buytaert 7e1527ee61 - Patch #29465: new form API by Adrian et al.
TODO:
  + The contact.module was broken; a new patch for contact.module is needed.
  + Documentation is needed.
  + The most important modules need to be updated ASAP.
2005-10-07 06:11:12 +00:00
Dries Buytaert 50ac9d3b4c - Patch #32103 by nedjo: fixed title validation. 2005-09-27 15:09:28 +00:00
Dries Buytaert 67e68fc679 - Patch #28786 by Neil: move pagers out of table. 2005-09-24 07:53:26 +00:00
Dries Buytaert 61740bd8ee - Patch #10056: allow the node title forms to be customized. 2005-09-23 08:47:13 +00:00
Dries Buytaert 1dc53d9761 - Patch #3986 by James (and Boris :)):consolidated all feed-related settings in one place.
* adds a "feed settings" section to admin/settings where 2 new settings are introduced:
* number of items per feed
* default length of feed descriptions (title only, teaser, full)
* patches all of core to obey the above - including the new aggregator (out) feeds
* adds support for adding namespaces in _nodeapi('rss item') - which means things like iTunes RSS and yahoo's media rss can be implemented by the appropriate modules (i.e. audio.module)
* includes some additional info in the default node feed - specifically the element (links directly to comments) - and dc:creator - to show node author information.
2005-09-18 10:37:57 +00:00
Steven Wittens 69247d7aad - #30128: Call by reference left-overs 2005-09-02 02:11:41 +00:00
Dries Buytaert d9d6a6e05c - Patch #7582 by Gerhard: improved node revisions!
All node revisions were stored in a serialized field in the node table and retrieved for _each_ page view although they are rarely needed. We created a separate revisions table which would be in principle identical to the node table, only that it could have several old copies of the same node.  This also allows us to revision-related information, and to provide log entries to non-book pages when a new revision is being created.

TODO:

1. Provide upgrade instructions for node module maintainers!
2. Upgrade modules that implement node types.
3. Provide an upgarde path for revisions.  Dependency on the upgrade system.
2005-08-30 15:22:29 +00:00
Dries Buytaert 246274eb16 - Renamed _node() to _node_info()! We reserve _node for _nodeapi. 2005-08-29 19:58:49 +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 b5573842b8 - Patch #29593 by tostinni: fixed display of title on admin/settings/content-type/ pages. 2005-08-25 21:22:00 +00:00
Dries Buytaert 7b8a409675 - Patch #29385 by chx: no ?> add end of files. 2005-08-25 21:14:17 +00:00
Dries Buytaert 6a4e6df36f - Patch #17592 by killes: improved access denied messages. 2005-08-22 20:39:43 +00:00
Dries Buytaert 3b8220e6f5 - Patch #29335 by jonbob: shuffled the case-statements around for performance's sake. 2005-08-22 10:11:15 +00:00
Dries Buytaert ceb013278e - Patch #23750 by jerakeen: use the creation date rather than the update date in RSS feeds. 2005-08-11 12:53:39 +00:00
Dries Buytaert 2a87b5029b - Patch #24002: fixed node created timestamp changing on node edit. 2005-08-07 15:53:26 +00:00
Dries Buytaert 79f08aca2c - Patch #26637 by Robert Douglas: $teaser misnamed in themes theme_node().
TODO: update documentation!
2005-08-07 14:55:17 +00:00
Steven Wittens f7039a67cc - #25395: Allow for more integers in node_access grant_x columns 2005-08-05 13:11:10 +00:00
Steven Wittens 88c6184c25 - #27864: Correctly distinguish 403s from 404s for nodes. 2005-08-05 00:38:38 +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 70bc4639fa - Patch #27535 by Ber: set 'preview status message' using drupal_set_message(). 2005-07-31 10:28:50 +00:00
Steven Wittens e4096e1418 - #27551: Rename check_output() to check_markup(). Needs contrib updates! 2005-07-29 21:06:33 +00:00
Steven Wittens f0c5a2860a - #26458: node_search doesn't node_view, causing bad snippets. 2005-07-29 03:29:53 +00:00
Steven Wittens d720c66148 - #26458: node_search doesn't node_view, causing bad snippets. 2005-07-29 03:21:09 +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
Steven Wittens 5ed64a71bd - Fix oopsie in node_load() after recent patch. 2005-07-18 20:27:32 +00:00
Dries Buytaert 1a0655dce9 - Updated handbook-link to reflect the recent handbook restructuring. 2005-07-18 08:46:30 +00:00
Dries Buytaert b7c0975e23 - Fixed typo in PHPdoc 2005-07-17 21:08:49 +00:00
Dries Buytaert 2895357de0 - Modified patch #25031 by chx: modified node_list() so one has both the module and its type.
TODO: update migration page in handbook.
2005-07-17 20:57:43 +00:00
Dries Buytaert 160a1e0ef8 - Patch #25634 by chx: simplified node_load(). 2005-07-17 18:29:32 +00:00
Dries Buytaert 73010a5215 - Fix by darix: fixed content type settings broken by berkes' last patch. 2005-07-07 13:30:50 +00:00
Dries Buytaert d96e7e0bbb - Patches by Ber: move user settings and node settings to admin/settings. 2005-07-03 16:41:42 +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 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 f3a9a99570 - Patch #25121 by Robrecht J.: changed itemized lists with hardcoded CSS to definition lists. 2005-06-21 18:58:27 +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 8436082fe1 - Removing some whitespace 2005-06-06 14:07:04 +00:00
Steven Wittens c928f9c1bb - #18836: Cleanup teaser generation code, and refine handling of PHP code teasers. 2005-06-01 03:42:47 +00:00
Steven Wittens 5257b684ff - #18836: Cleanup teaser generation code, and refine handling of PHP code teasers. 2005-06-01 03:32:22 +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
Dries Buytaert d0390be0bd - Patch #18275 by Steven: "create content" menu displays extraneous links.
(Not sure if this needs to be backported to DRUPAL-4-6.)
2005-05-26 19:29:48 +00:00
Steven Wittens cbd6837b40 - #18406: make node_page 404 on meaningless nids 2005-05-25 07:14:00 +00:00
Steven Wittens 09354344e0 - Sort admin-content by descending node date. This got lost in the refinement-filter patch. 2005-05-25 03:51: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 a5489b7b1c - Patch by chx: added a db_rewrite_sql() in node_load() just to make sure. 2005-05-17 20:24:33 +00:00
Dries Buytaert a76a1e1f3f - Patch 20910 by chx: centralize print theme page. 2005-04-24 16:34:36 +00:00
Dries Buytaert 9802b20a17 - Patch #20188 by Goba: Node_feed() instructs the nodeapi view call it invokes to deal with the body of the node, but afterwards it only uses the teaser to generate the feed. So the nodeapi hook should be called with teaser processing in mind. This simple patch fixes that. 2005-04-11 16:39:19 +00:00
Dries Buytaert 91e8b1b1e4 - Removed weird phpdoc line 2005-04-05 07:25:11 +00:00
Dries Buytaert a3e9b35afc - Patch #19451 by JonBob: improved consistency of module descriptions. We should write guidelines for this -- maybe in the PHPDoc code of the _help hook. 2005-04-01 15:55:02 +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
Steven Wittens 54dfc577ba - #19353: Fix 'submit' button behaviour wrt optional previewing and form errors. 2005-03-27 21:34:50 +00:00
Steven Wittens d8fad6e24f - #17343: Fix safari CSS issues with node admin. 2005-03-27 15:54:44 +00:00
Steven Wittens 576c60803d - #19405: Fix SQL in comment block for anonymous users. 2005-03-24 22:09:31 +00:00
Steven Wittens 1185839923 - #19089: Remove depency on taxonomy.module by node.module (kjartan) 2005-03-18 18:46:23 +00:00
Steven Wittens e17490b653 - #12401: Non-admins should obey workflow wrt revisions. 2005-03-18 08:14:37 +00:00
Dries Buytaert 49240b6b1e - Patch #18216: fixed nodeapi settings hook. 2005-03-07 21:58:13 +00:00
Dries Buytaert 0f7be2573e - Bumped the RSS version from 0.92 to 2.0 2005-03-07 21:52:57 +00:00
Dries Buytaert 77f7aa0211 - Patch #18418 by chx: jonbob node_access_view_all patch changed the return value of node_access_where_sql to empty which breaks nicely all queries which are still using this function. This is a good incentive to upgrade to db_rewrite_sql, yes, but I think it causes confusion, 'cos it is not really trivial why the query suddenly not works. Let's make it trivial -- rename it _node_access_where_sql, it is no longer a function to be called from outside. node_access_join_sql similarly. 2005-03-05 11:05:07 +00:00
Steven Wittens 96eb9c6f9f #18226: Non-admins were not obeying workflow. 2005-03-04 00:48:22 +00:00
Steven Wittens 198ec98f75 #18329: Unify confirmation messages (and make them themable) 2005-03-03 20:51:27 +00:00
Dries Buytaert 3123d7e6ec - Patch #18045 by JonBob: the node type admin page uses an unclear callback name, and uses arg() where it is not necessary. The attached patch cleans this up by unifying node_types() with node_types_configure(). 2005-03-01 20:07:48 +00:00
Dries Buytaert a4befbb68b - Patch #18123 by chx: the $return['distinct'] in the past should have been module_implements('node_grants') but after JonBob's node_access_view_all_nodes, that part happens only if node_grants is in effect, so it is simplified to 1. 2005-03-01 20:01:40 +00:00
Steven Wittens ff386b90bb #17747: PGSQL improvements 2005-02-28 18:00:59 +00:00
Steven Wittens 538a3071de - #17870: Add preview CSS class to node preview (drumm) 2005-02-27 02:54:24 +00:00
Dries Buytaert 1e15bed312 - Patch #17687 by Gerhard: removed some cruft. 2005-02-21 19:47:44 +00:00
Steven Wittens bb08146c67 - Fixing broken search after sql rewrite patches
- Minor code style fixes.
2005-02-19 22:24:24 +00:00
Dries Buytaert d6b553c256 - Patch #16558 by JonBob: improved performance of node access checks. 2005-02-18 18:40:05 +00:00
Dries Buytaert 892d828629 - Fixed broken colspan. Reported by asimmonds. 2005-02-14 21:28:08 +00:00
Dries Buytaert 95f4d9751e - Fixed broken colspan. 2005-02-11 19:10:28 +00:00
Dries Buytaert 470fe1c1fd - Patch #16960 by Goba: fixed content type options. 2005-02-10 20:58:03 +00:00
Dries Buytaert 08e7c8b3a7 - Patch #16246 by Moshe: "Here is a patch for node.module since thta hunk failed last time. Note that I've removed the 'delete' link since it doesn't work and is mostly obsolete with the 'mass delete' feature. I've also added smart destination andling to the 'url alias delete' feature." 2005-02-10 19:30:08 +00:00
Steven Wittens 95907f0c2e - Fixing broken drupal_goto() after node submission on PHP5. 2005-02-04 20:48:37 +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
Steven Wittens ab816b6d6d - Fix warning due to old session variable. 2005-02-02 01:03:25 +00:00
Steven Wittens d56cf2b59c #10296: Clean up admin - content:
- Mass-delete functionality (with confirmation)
- Flexible filtering for the overview table based on status, type and taxonomy.
- Missing drupal_goto's
- Clean up watchdog messages
- Remove some dead code
2005-02-02 00:55:59 +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 96c039680a - Patch #16111 by chx: fixed some bugs in the db_rewrite_sql() code. 2005-01-31 20:45:10 +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 c0f06fbe67 - Patch #6025 by Jeremy: avoid data to get lost when two users are editing a node at the same time. 2005-01-27 14:45:42 +00:00
Dries Buytaert 7415e0b1c8 - Patch #16192 by Neil: moved the submission guidelines found in forum, story, and blog and the minimum number of words found in story and blog (blog had a slight bug) into the node module. 2005-01-26 22:59:41 +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 9cd36863b0 - I had to modify chx's patch/change because it did not work with PHP5. Please double-check. 2005-01-23 16:20:10 +00:00
Dries Buytaert 898e02252d - Patch #16026 by chx: fixed node-level permissions. 2005-01-23 15:45:38 +00:00
Steven Wittens a332228326 Documenting a tricky regexp. 2005-01-22 22:33:20 +00:00
Steven Wittens 4e6ceaae99 - Another code style fix. 2005-01-19 01:51:58 +00:00
Steven Wittens 09bd156ba2 - Fix tracker pager count query being wrong (it did not return a count but a set, and it counted nodes with more than 1 comment as multiple nodes).
- Clean up various SQL queries: removing literally inserted data (db_escape_string is evil!), fixing single "%" which should be "%%", fixing integers being compared as strings.
2005-01-19 01:46:25 +00:00
Steven Wittens 86af977eca - #15500: Fix tracker not showing nodes without comments.
- Tiny code style fix
2005-01-19 01:12:14 +00:00
Steven Wittens e7edb55d63 - The real code fixes ;) 2005-01-17 19:00:03 +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 92bc08b5b9 - Make the search settings page more user-friendly. 2005-01-11 09:41:49 +00:00
Steven Wittens 8655d4368a - Fixing a couple of watchdog() calls. 2005-01-09 12:58:53 +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 1dbe0dc2ee - Patch #14917 by UnConeD/Steven:
1) The different types of search, which used to be radio button options in the search form, are now subtabs of "search" (default "search/node"). This seems better from a UI point of view, but also has another advantage: modules which implement a custom search form (flexinode, project) can add it as a subtab of search. This means that all search forms will be located in the same place, and also without needing an extra api call to search.module.

2) The current code was a bit hackish, as the indexing of comments along with nodes was hardcoded in node.module. Instead, I created a nodeapi operation "update index" which allows modules to add more data for a node that is being indexed. Comments are now indexed using this mechanism and from comment.module, which is a lot cleaner.

3) The search results format was also hardcoded to include "N comments". I replaced this with a nodeapi operation "search result" and moved the comment code to comment.module where it belongs. This op is quite useful, as for example I also modified upload.module to add "N attachments" to a search result if any are present.
2004-12-31 09:30:12 +00:00
Dries Buytaert 05ede21745 - Patch #6308 by gordon: allow node_submit() to be used by external interfaces. 2004-12-26 20:10:02 +00:00
Steven Wittens 61b174e7d2 #11548: node.module - Ensure that only valid fields are saved 2004-12-24 06:44:11 +00:00
Dries Buytaert fde5f1bf6f - Patch #14709 by matteo: added missing call to the nodeapi's 'view' hook. 2004-12-23 23:26:14 +00:00
Steven Wittens 9f7b16ada9 #12793: Remove dependency of node.module on search.module. 2004-12-20 14:34:41 +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 6e3eb60aab - Removed some cruft: left-over xxx_help_page() functions. 2004-12-11 14:13:24 +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 2afd987398 Search: indexing should invoke nodeapi to catch all user-visible data (e.g. file attachment names). 2004-12-02 06:44:55 +00:00
Dries Buytaert b83b34018f - Patch #10697 by matteo: avoid that administrators can create nodes with the wrong node type. 2004-11-29 12:49:17 +00:00
Dries Buytaert e1cf88e7f8 - Modified patch #11840 by Stefan: added conctext-sensitive help text to the 'revision'-page. 2004-11-27 10:02:06 +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 9574766ad8 - Patch by Stefan: wrapped the help texts in <p></p> tags. Helps improve consistency. 2004-11-23 22:20:41 +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
Steven Wittens dc32e54f31 Search.module:
- Caching index statistics
- Minor code cleanup
2004-11-18 21:28:34 +00:00
Steven Wittens 90e67a3acb Search indexing bug: last updated timestamp needs to take last comment timestamp into account. 2004-11-18 21:16:30 +00:00
Dries Buytaert 38c91a8d95 - Patch #8506 by Gerhard: added basic node_load() caching. 2004-11-17 22:14:43 +00:00
Dries Buytaert 9979aceab0 - Patch #12783 by Stefan: various small consistency/usability improvements. 2004-11-15 11:16:39 +00:00
Dries Buytaert 40f6197c5b - Patch #11940 by kps: if the user is not allowed to view a newly submitted node, redirect him to the main page. 2004-11-15 09:55:28 +00:00
Dries Buytaert 14353d18ad - Slightly modified the API of node_title_list(): it will no longer call comment_num_all() for each node. Instead, it checks for the availability of the node_comment field, available through the node_comment_statistics table. If updated the Doxygen comments accordingly.
People were using node_title_list() without realizing it would do numereous database queries.  This change greatly reduces the number of database queries required to render the node statistics block as well as to render the forum block (coming up next).

  If your module is using node_title_list() and you want the number of comments to be shown as title attributes, chances are you have to update your SQL query to join node_comment_statistics.
2004-11-04 21:02:30 +00:00
Dries Buytaert b6eee48c88 - Patch #12232 by Steven: more search improvements:
+ When a comment is posted, a node needs to be re-indexed. Luckily, we can use node_comment_statistics for this easily.
   + When a node is deleted, it should be deleted from the search index as well.
   + The search wipe didn't properly remove links to nodes from the index.
   + Section url was faulty in _help.
   + Minor code rearrangement.
2004-11-04 06:47:03 +00:00
Dries Buytaert bd6ae69345 - Patch by Steven:
+ Display 'friendly' name rather than module name in search watchdog
     messages.
   + Remove left-over from search_total table.
   + Add index wipe button to the admin
   + Moved the admin to admin/settings/search
   + Prevented menu bug when node modules update the breadcrumb in view
     (thanks JonBob).
   + Changed search_total table's word key to PRIMARY.
2004-11-03 16:46:58 +00:00
Dries Buytaert b3adcf05a3 - Patch #11875 by Neil Drumm: block module configuration improvements.
The primary goal of this patch is to take the 'custom' and 'path' columns of the block overview page and make them into something understandable. As of Drupal 4.5 'custom' lacked an explanation which wasn't buried in help text and path required dealing with regular expressions.

Every block now has a configuration page to control these options. This gives more space to make form controls which do not require a lengthy explanation. This page also gives modules a chance to put their block configuration options in a place that makes sense using new operations in the block hook.

The only required changes to modules implementing hook_block() is to be careful about what is returned. Do not return anything if $op is not 'list' or 'view'. Once this change is made, modules will still be compatible with Drupal 4.5. Required changes to core modules are included in this path.

An additional optional change to modules is to implement the additional $op options added. 'configure' should return a string containing the configuration form for the block with the appropriate $delta. 'configure save' will come with an additional $edit argument, which will contain the submitted form data for saving. These changes to core modules are also included in this patch.
2004-10-31 07:34:47 +00:00
Dries Buytaert 8daed9cbf3 - Patch #12232 by Steven/UnConed: search module improvements.
1) Clean up the text analyser: make it handle UTF-8 and all sorts of characters. The word splitter now does intelligent splitting into words and supports all Unicode characters. It has smart handling of acronyms, URLs, dates, ...

2) It now indexes the filtered output, which means it can take advantage of HTML tags. Meaningful tags (headers, strong, em, ...) are analysed and used to boost certain words scores. This has the side-effect of allowing the indexing of PHP nodes.

3) Link analyser for node links. The HTML analyser also checks for links. If they point to a node on the current site (handles path aliases) then the link's words are counted as part of the target node. This helps bring out commonly linked FAQs and answers to the top of the results.

4) Index comments along with the node. This means that the search can make a difference between a single node/comment about 'X' and a whole thread about 'X'. It also makes the search results much shorter and more relevant (before this patch, comments were even shown first).

5) We now keep track of total counts as well as a per item count for a word. This allows us to divide the word score by the total before adding up the scores for different words, and automatically makes noisewords have less influence than rare words. This dramatically improves the relevancy of multiword searches. This also makes the disadvantage of now using OR searching instead of AND searching less problematic.

6) Includes support for text preprocessors through a hook. This is required to index Chinese and Japanese, because these languages do not use spaces between words. An external utility can be used to split these into words through a simple wrapper module. Other uses could be spell checking (although it would have no UI).

7) Indexing is now regulated: only a certain amount of items will be indexed per cron run. This prevents PHP from running out of memory or timing out. This also makes the reindexing required for this patch automatic. I also added an index coverage estimate to the search admin screen.

8) Code cleanup! Moved all the search stuff from common.inc into search.module, rewired some hooks and simplified the functions used. The search form and results now also use valid XHTML and form_ functions. The search admin was moved from search/configure to admin/search for consistency.

9) Improved search output: we also show much more info per item: date, author, node type, amount of comments and a cool dynamic excerpt à la Google. The search form is now much more simpler and the help is only displayed as tips when no search results are found.

10) By moving all search logic to SQL, I was able to add a pager to the search results. This improves usability and performance dramatically.
2004-10-31 03:03:27 +00:00
Steven Wittens f46a82da51 #7607: Sort node types in node/add by translated names. 2004-10-29 00:51:49 +00:00
Dries Buytaert 10f329c057 - Patch #11728 by Uwe Hermann: fixed some typos in the code comments, Doxygen documentation and screen output.
Uwe: I dropped the 'iff' chunks as 'iff' stands for 'if and only if'.
2004-10-19 18:02:31 +00:00
Dries Buytaert 7ebd772f41 - Patch #10664 by TDobes: fixed collapsed comments + updated the code comments. 2004-10-16 07:22:26 +00:00
Dries Buytaert 2510f322a1 - Modified patch #10613 by killes: generate a 'page not found'-page when a requested node does not exist. I modified the patch to avoid duplicate 'not found'-checking in the second bulk. 2004-10-12 20:01:25 +00:00
Dries Buytaert abcfd21927 - Code improvement: removed some redundant code from the node module. 2004-10-10 11:17:24 +00:00
Dries Buytaert 50bf139960 - Fixed bug #11405: unchecking the "publish" box in the default workflow admin page (admin/node/configure/defaults) did not cause the default workflow to change. This was caused by the fact that node_validate() forced the value of the status field to "1". 2004-10-09 16:27:59 +00:00
Dries Buytaert 503c784557 - Simplified/reorganized version of patch #9620 by Jeremy: fixed errors when writing to cache. 2004-10-04 22:04:07 +00:00
Steven Wittens dbead89c1f Part of #11280: node_preview() should only generate a teaser if none is present (e.g. provided by a module like excerpt.module). 2004-10-04 20:34:23 +00:00
Steven Wittens 1298d2b9c9 Modified version of #10230: Put placement of filter format selector in a module's hands, and move it below the relevant textarea. 2004-09-28 19:13:03 +00:00
Dries Buytaert 4f5164c980 - Patch #10977 by Gerhard: added missing node access controls for RSS feeds. 2004-09-21 18:43:54 +00:00
Dries Buytaert 293c283c3b - Patch #10884 by killes: node_access_where_sql() lost a parameter. 2004-09-20 20:06:29 +00:00
Dries Buytaert 8ae5e4417a - Bugfix: it was not possible to delete nodes. Reported by Philippe. 2004-09-20 12:05:31 +00:00
Dries Buytaert 5c7983c4de - Patch #8179 by JonBob: reintroduced menu caching. 2004-09-16 07:17:56 +00:00
Steven Wittens a82b5143cf Removing useless 'read more' title attribute, as discussed. 2004-09-14 21:03:23 +00:00
Steven Wittens 93f193d7ad #8424: more meaningful link title=".." attributes for node_title_list(). 2004-09-14 02:28:37 +00:00
Steven Wittens b75c1e1c8b Replace hardcoded <html lang="en"> with a locale dependant one. This is especially important for asian sites where this has an effect on font selection. 2004-09-09 13:36:01 +00:00
Dries Buytaert b84b6e42cf - Patch #10663 by JonBob: documentation improvements: fixed some typos and improved consistency to the use of Doxygen/api.module commands in the comments. 2004-09-09 05:51:08 +00:00
Dries Buytaert 3f894f81e9 - Bugfix: removed bogus $name parameters.
TODO: when 'previewing' an existing node, the breadcrumb trail is incorrect.
2004-09-08 20:51:45 +00:00
Steven Wittens c76d5db8bd Node.module: teaser autogeneration should not overwrite user/module-supplied teaser data.
(makes excerpt.module possible)
2004-09-06 13:26:00 +00:00
Steven Wittens cdb6aa723b - #10342: PHP5 fix with undefined array. 2004-08-25 16:41:30 +00:00
Steven Wittens ad13675a4f - Fixing bug with PHP5 patch. 2004-08-23 00:44:02 +00:00
Steven Wittens 51cf18e531 - #9292: Make Drupal (somewhat) PHP5 compatible. xtemplate is still horribly broken. 2004-08-22 17:03:42 +00:00
Dries Buytaert 8b8a2bd634 - Patch #10187 by JonBob: bugfix: added missing permission check. 2004-08-21 16:04:12 +00:00
Dries Buytaert 94e30bf776 - Patch by JonBob: for consistency and readability, add brief descriptions of each source file inside the @file comment block at the head of the file. This helps with Doxygen indexing, and also allows neophytes to see what a file does immediately on opening the source, regardless of the organization of the hooks. 2004-08-21 06:42:38 +00:00
Dries Buytaert fa25c7a0ca - Code improvements by Stefan: use capital letters for header titles (and added some missing t() functions). 2004-08-19 15:41:57 +00:00
Dries Buytaert 83a739bd89 - Code improvements by Stefan: made all status messages consistent (and easier to translate). 2004-08-18 19:57:27 +00:00
Dries Buytaert 78b052a6af - The upload (filehandler) module has landed! 2004-08-17 21:35:26 +00:00
Dries Buytaert 451821abe7 - Patch #10110 by JonBob: code improvement: looks like we have an artifact from before clean URLs in node.module. This patch removes the global variable $mod, which is no longer set and not necessary here anyway. 2004-08-16 18:31:44 +00:00
Dries Buytaert 2f33b939c5 - Patch #9983 by Stefan: usability improvement: made sure all status messages start with a capital letter. 2004-08-16 18:02:48 +00:00
Dries Buytaert ef07dd08f4 - Patch #10102 by Gerhard: removing some cruft from the node module! 2004-08-16 17:51:12 +00:00
Steven Wittens fc99c57d87 #6732: fixing bug 'once anonymous always anoymous' (nodes). 2004-08-14 17:05:32 +00:00
Steven Wittens cb36ef37cc #10033: by Jonbob, make sure no filter check is done until the first preview. 2004-08-13 18:17:10 +00:00
Steven Wittens 441b63accd Moving all legacy handlers into legacy.module. 2004-08-12 15:12:26 +00:00
Dries Buytaert 543d8b7208 - Patch #9972 by njivy: modified node_feed() for the instances where locale is not enabled. Without this patch, reset(array_keys($languages['name'])) throws an error. 2004-08-12 05:44:11 +00:00
Dries Buytaert 1831e1b690 - New locale module thanks to Gerhard, Goba, Marco, Kristjan and others.
The new locale module provides every functionality on the web interface, so you don't need to edit the configuration files or add columns, when you add a new language. This module is an integration of the old locale and localegettext modules, plus a bunch of logic to parse Gettext Portable Object files (opposed to Machine Object files, as supported by localegettext).

  Note: I made some minor changes to the context-sensitive help texts and to some of the status messages.
2004-08-11 11:26:20 +00:00
Steven Wittens 660f99287d The Input formats - filter patch has landed. I still need to make update instructions for modules and update the hook docs.
Here's an overview of the changes:
1) Multiple Input formats: they are complete filter configurations (what filters to use, in what order and with which settings). Input formats are admin-definable, and usage of them is role-dependant. For example, you can set it up so that regular users can only use limited HTML, while admins can free HTML without any tag limitations.
The input format can be chosen per content item (nodes, comments, blocks, ...) when you add/edit them. If only a single format is available, there is no choice, and nothing changes with before.

The default install (and the upgrade) contains a basic set of formats which should satisfy the average user's needs.

2) Filters have toggles
Because now you might want to enable a filter only on some input formats, an explicit toggle is provided by the filter system. Modules do not need to worry about it and filters that still have their own on/off switch should get rid of it.

3) Multiple filters per module
This was necessary to accomodate the next change, and it's also a logical extension of the filter system.

4) Embedded PHP is now a filter
Thanks to the multiple input formats, I was able to move the 'embedded PHP' feature from block.module, page.module and book.module into a simple filter which executes PHP code. This filter is part of filter.module, and by default there is an input format 'PHP', restricted to the administrator only, which contains this filter.
This change means that block.module now passes custom block contents through the filter system.
As well as from reducing code duplication and avoiding two type selectors for page/book nodes, you can now combine PHP code with other filters.

5) User-supplied PHP code now requires <?php ?> tags.
This is required for teasers to work with PHP code. Because PHP evaluation is now just another step in the filter process, we can't do this. Also, because teasers are generated before filtering, this would result in errors when the teaser generation would cut off a piece of PHP code.

Also, regular PHP syntax explicitly includes the <?php ?> tags for PHP files, so it makes sense to use the same convention for embedded PHP in Drupal.

6) Filter caching was added.
Benchmarking shows that even for a simple setup (basic html filtering + legacy URL rewriting), filtercache can offer speedups. Unlike the old filtercache, this uses the normal cache table.

7) Filtertips were moved from help into a hook_filter_tips(). This was required to accomodate the fact that there are multiple filters per module, and that filter settings are format dependant. Shoehorning filter tips into _help was ugly and silly. The display of the filter tips is done through the input format selector, so filter_tips_short() no longer exists.

8) A more intelligent linebreak convertor was added, which doesn't stop working if you use block-level tags and which adds <p> tags.
2004-08-10 18:34:29 +00:00
Dries Buytaert 821c6d2d17 - Patch #9812 by Adrian: fixed some PostgreSQL/ANSI SQL compabitibility
problems created by the new comment and node access permissions code.
2004-08-06 21:00:43 +00:00
Dries Buytaert b47e4e16d3 - Patch #9794 by JonBob: a bug introduced late in the review process makes individual node views inaccessible to users who should have permission. This does not affect node listings, so was missed. 2004-08-05 20:26:25 +00:00
Dries Buytaert c6b1eaa20d - Patch #9775 by TDobes: consistency operation. Changed to "edit foo," "delete foo," and "view foo" links into simply "edit," "delete," and "view". 2004-08-05 05:40:53 +00:00
Dries Buytaert 07ae0fad65 - Patch #9497 by gordon: made <!--break--> work even when the teaser length
is set to unlimited and fixed up some code comments.
2004-08-04 21:19:12 +00:00
Dries Buytaert c0f6fccac3 - Patch #7336 by TDobes: in various parts of Drupal, we use the title attribute for links to provide a slightly more detailed explanation as to the purpose of a link or where it goes. 2004-08-03 18:01:48 +00:00
Dries Buytaert 202eee42a9 - Patch #9543 by JonBob: added node-level access control! 2004-07-31 09:30:09 +00:00
Dries Buytaert aed1b0ca9e - Patch #5347 by JonBob:
Here's a new patch that unifies the node/52 and book/view/52 paths for nodes. It involves a small change to hook_view(), which is discussed first:

Currently hook_view() expects node modules to return a themed node. However, each module does this the same way; they modify $node as necessary, then call theme('node', $node) and return the result. We can refactor this so that the calling function node_view() calls theme('node') instead. By doing this, it becomes possible for hook_nodeapi('view') to be called after hook_view() where the node contents are filtered, and before theme('node') where the body is enclosed in other HTML. This way the book module can insert its navigation into the body right before the theming.

Advantages of this refactoring:
- I can use it for book.module to remove the extra viewing path.
- The function of hook_nodeapi('view') becomes more like hook_view(), as neither will expect a return value.
- We more closely follow the flow of other nodeapi calls, which usually directly follow their corresponding specific node type hooks (instead of preceding them).
- The attachment.module people could use it to append their attachments in a list after the node.
- Gabor could use it instead of his filter perversion for his "articles in a series" module.
- A little less code in each view hook.
- The content hook is no longer needed, so that means even less code.

Disadvantages:
- Any modules written to use nodeapi('view') could be affected (but these would all be post-4.4 modules).
- Implementations of hook_view() would need to be updated (but return values would be ignored, so most would work without updates anyway).

Now the patch takes advantage of this API shift to inject its navigation at the end of all book nodes, regardless of the viewing path. In fact, since the paths become identical, I've removed the book/view handler entirely. We should probably provide an .htaccess rewrite for this (one is still needed for node/view/nn anyway). At the same time, there is a check in book_block() that shows the block appropriately on these pages.
2004-07-30 13:37:26 +00:00
Dries Buytaert df2e5ef505 - Patch #8942 by Morbus: when testing under devel.module, the "SELECT timestamp from {history}" SQL statement is executed multiple times in two different functions. This duplicated code should be placed in a function, and that's been done already with node_last_visited() - the remaining code was just never updated to use the new routine. This patch changes the old code to use node_last_visited, and also modifies node_last_visited() to cache the result of the database call. 2004-07-13 20:44:13 +00:00
Dries Buytaert ac5b5616c0 - More tab-improvements by JonBob: improved support for the default tabs! 2004-07-10 15:51:48 +00:00
Dries Buytaert 898bdeffaf - Marked required fields on the node (story, book, page, blog) and comment
forms using the $required argument of the form_ functions.

- Replaced all Optional's and Required's from the taxonomy forms with proper
  use of the form_ functions.

Please check your contributed modules too!
2004-07-08 15:24:30 +00:00
Steven Wittens d615cb245e - Added revisions tab to node view (when needed)
- Updated node.module to use drupal_goto after submission: this allows people to refresh after submission without any problems.
2004-07-04 19:24:52 +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 353c05d015 - Made it possible to edit blog posts and made the blog module use tabs. 2004-07-04 10:30:42 +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
Dries Buytaert e288b4ddb1 - Patch #8747 by JonBob: extended and standardized node.module Doxygen
comments, and made formatting and quote usage more consistent.
2004-06-22 20:24:27 +00:00
Dries Buytaert 090743bdba - Patch #8670 by asimmonds: more spelling fixes. 2004-06-21 20:05:37 +00:00
Dries Buytaert bfa7d178a9 - Patch #8713 by stefan: changed some 'node's to 'post's. Usability improvement. 2004-06-21 20:01:49 +00:00
Dries Buytaert c2d7419f23 - Patch #8681 by stefan: fixed some broken URLs and help texts. 2004-06-20 19:49:14 +00:00
Dries Buytaert efed4cfc70 - Patch #8679 by asimmonds: fixed spelling mistakes. 2004-06-20 08:27:03 +00:00
Dries Buytaert cbc230a36c - Patch #7696 by TDobes: renamed 'static' to 'sticky' which is a more
logical name.  Requires a database upgrade.
2004-06-19 10:39:36 +00:00
Dries Buytaert 71c99bb213 - Patch #8619 by TDobes: fixed typo in watchdog message. 2004-06-19 10:10:11 +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
Dries Buytaert 5ad73c8eb6 - Partial patch #8284 by jseng: made the RSS auto-discovery URL absolute even though that is not strictly necessary. 2004-06-17 18:46:41 +00:00