Commit Graph

499 Commits (837bacfaaff36c136b5958282675d70f351fa3dd)

Author SHA1 Message Date
Gerhard Killesreiter d6a164c400 , drupal_get_destination, pager and tablesort array handling, patch by Steven 2006-04-13 08:25:27 +00:00
Gerhard Killesreiter 70aae83c8e , fixes for typos, patch by Uwe Herrmann 2006-04-11 11:33:15 +00:00
Steven Wittens 4c3fe45fe9 : Comment cids should belong to the associated nid 2006-04-04 07:07:45 +00:00
Steven Wittens 57be840338 : admin/comment needs to remember sort order in page 2006-04-04 01:26:05 +00:00
Steven Wittens b3cb4f0d9b : XHTML validation error due to comment.module links 2006-03-30 17:23:29 +00:00
Gerhard Killesreiter a76ee6c9ed , remove remnants of nodeapi('fields'), patch by myself 2006-03-28 06:12:15 +00:00
Steven Wittens d6f15f3051 - : Comment reply form anchor fixes 2006-03-27 08:08:31 +00:00
Gerhard Killesreiter 5885925b0d , Handling of deleted/blocked user accounts, patch by jreyero and Zen 2006-03-26 19:31:00 +00:00
Gerhard Killesreiter 0fad496ca0 , Security threat -- any user can delete comments, patch by robertgarrigos 2006-03-24 11:38:00 +00:00
Gerhard Killesreiter 63b3fea2b3 , Typo with page redirection upon login, patch by matt westgate 2006-03-20 16:40:06 +00:00
Dries Buytaert f51bc544f2 - Patch by markus: hook_comment not called for all update operations. 2006-03-06 20:52:55 +00:00
Dries Buytaert c54a0f575f - Patch by wtanaka: clicking on 'add new comment' takes you to the wrong place. 2006-03-06 18:09:17 +00:00
Dries Buytaert 5de716f100 - Patch by markus: print message when replying to non-existing comment. 2006-03-04 18:01:54 +00:00
Gerhard Killesreiter 784202418f , Wrong user name in admin/comment, patach by Markus Petrux 2006-02-27 14:54:24 +00:00
Dries Buytaert 66576708a0 - Patch by eafarris: fixed typo: coment -> comment. 2006-02-26 19:52:09 +00:00
Dries Buytaert 3489651659 - Patch by Zen: 'user comments' -> 'comment settings'. 2006-02-26 19:47:55 +00:00
Dries Buytaert c94a2dabb0 - Patch by markus: = -> ==. 2006-02-22 19:02:58 +00:00
Dries Buytaert cb05945caf - Patch by wtanaka: performance improvement. 2006-02-22 10:05:06 +00:00
Dries Buytaert 3603fe1bd8 - Patch : www.drupal.org -> drupal.org. (Today's critical bugfix #5.) 2006-02-21 18:46:54 +00:00
Dries Buytaert 7489c87476 - Patch by Tobias: don't accept spaces. 2006-02-14 19:17:00 +00:00
Dries Buytaert 583d5a4ee9 - Patch by adrian: remove drupal_goto from _submit functions. 2006-02-10 05:25:57 +00:00
Steven Wittens 1819de963f - : Editing own comment broken under postgresl 2006-02-09 09:09:03 +00:00
Steven Wittens c9a19e3084 - : Comment thread coding inefficient 2006-02-09 08:33:36 +00:00
Dries Buytaert 91e152b8b8 - Patch by DriesK: comment moderation/approval wasn't working due to a bug with its forms. 2006-02-04 09:54:16 +00:00
Dries Buytaert baa2ecc81c - Patch by Cvbge: fixed problem with deleting comments. 2006-02-01 14:04:50 +00:00
Dries Buytaert a6dac9d2ab - Modified patch by chx: comment token is broken. 2006-01-31 15:26:39 +00:00
Dries Buytaert 20154df528 - Modified patch by wtanaka: creating a comment, editing a comment, or anything that validates a comment fails on PHP5. 2006-01-26 08:48:57 +00:00
Dries Buytaert 5d43619ca7 - Patch by moshe/wtanaka: login and regsiter links on each comment don't redirect back to the topic. 2006-01-26 08:27:58 +00:00
Dries Buytaert b8832d76a0 - Patch by wtanaka/killes: #comment-form has disappeared from comment.module 2006-01-25 08:54:40 +00:00
Dries Buytaert b6b98bb60d - Patch by Cvbge: deleting a comment creates incorrect entry in node_comment_statistics. 2006-01-22 07:26:33 +00:00
Dries Buytaert 4da1540a9f - Patch by Neil: usability improvement: disable anonymous commenting options when anonymous people can't comment. 2006-01-20 09:33:03 +00:00
Dries Buytaert 8c02d4ec93 - Patch 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 by Morbus Iff: input filters aren't sorting correctly infForms API. 2006-01-19 08:54:41 +00:00
Dries Buytaert 47dd0142e6 - Patch by chx/drumm/merlinofchaos: critical bugfix: made editing comments work. 2006-01-18 15:09:39 +00:00
Dries Buytaert cb45cf58fb - Patch by wtanaka: make the comment block themable. 2006-01-17 18:02:23 +00:00
Dries Buytaert 226a26a556 - Removed reference to comment moderation. 2006-01-10 19:41:15 +00:00
Steven Wittens 49e5e1cd47 - : restore admin/comment tablesort 2006-01-08 00:29:37 +00:00
Steven Wittens 030fd1798a - Comment bug: anchor links should be specified using $fragment in url() and drupal_goto(). 2006-01-06 01:14:17 +00:00
Dries Buytaert 24899dba42 - Patch by chx, merlingofchaos, et al: bug fix: fixed the default comment settings on node sumbission forms. 2006-01-05 14:35:55 +00:00
Dries Buytaert 8d7ff5aea2 - Patch by merlinofchaos: critical bugfix: fixed comment ordering setting. 2006-01-05 10:53:47 +00:00
Dries Buytaert 72ed68d48b - Patch by markus_petrux: input format not correctly shown when editing a comment. 2006-01-03 23:04:23 +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
Dries Buytaert 6164074655 - Patch by saerdna: There's no need that users with the "administer comments" role has to go via admin/comments to delete comments. this patch simply adds the delete link on each comment if you have administer comments role. "access administration pages" not needed; because if they not have it they can still delete from admin/comments. 2005-12-19 10:12:52 +00:00
Dries Buytaert 21a9442bbb - Patch by billturner: fixed problem with the comment settings form. 2005-12-15 16:31:01 +00:00
Dries Buytaert 922a46d281 - Patch by Morbus/webchick/tangent: fixed order of form fields. 2005-12-15 16:24:40 +00:00
Dries Buytaert 5accfa08f5 - Patch 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 764f1177ef - Patch by Chris Johnson: is_array() slower than isset() or empty(). 2005-12-14 20:10:45 +00:00
Dries Buytaert 3ae534a64e - Patch by Cvbge: fixed problems with bulk comment operations. 2005-12-08 09:11:32 +00:00
Dries Buytaert e019ce5107 - Patch by Jeremy: added support for bulk operations on comments. 2005-12-07 05:35:02 +00:00
Dries Buytaert 28fdb3975e - Patch 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 80e02e6e73 - Patch by assimonds: fixed problem with editing signatures. 2005-12-03 19:39:15 +00:00
Dries Buytaert 26bd449860 - Patch by chx: rename '_execute' to '_submit' and '#execute' to '#submit'. 2005-12-02 15:21:01 +00:00
Dries Buytaert 8784a7d13a - Patch by Zen: comments that should be in the moderation queue get published. 2005-11-27 11:45:03 +00:00
Dries Buytaert c647b39c2c - Patch by Neil: fixed problem with node settings. 2005-11-27 11:11:46 +00:00
Dries Buytaert 247e012c35 - Patch by drumm: more logical naming of themeable functions 2005-11-27 11:07:02 +00:00
Dries Buytaert b1b1e2045f - Patch by Neil: allow non-workflow form elements on the node type settings page. 2005-11-25 10:11:59 +00:00
Dries Buytaert bd2d91807e - Patch by Neil: fixed infinite loop in comment.module. 2005-11-23 08:23:45 +00:00
Dries Buytaert 62e5c58777 - Patch by Neil: refactor comment viewing controls to _execute model. 2005-11-22 15:48:46 +00:00
Dries Buytaert 9f8fcab8db - Patch by asimmonds: post_process -> build_after 2005-11-22 15:13:15 +00:00
Dries Buytaert 28f973a986 - Patch by asimmonds/chx: converted the comment module to the forms API's _execute model. 2005-11-21 08:32:31 +00:00
Dries Buytaert e900d28640 - Patch by assimonds: added missing defines to comment.module. Improves
readability of the code.
2005-11-15 07:29:47 +00:00
Dries Buytaert d5d0149abe - Patch by DrupalJapan and chx:
+ Fixed problem with configuration of comment display options.
   + Introduced defines for the various comment settings.
2005-11-13 09:05:38 +00:00
Steven Wittens 21bed11e66 - Add missing url()s around form actions (these would break without clean URLs) 2005-11-13 02:32:18 +00:00
Dries Buytaert aeed4cd8e4 - Patch by webchick: forms API simplificiations. 2005-11-12 11:26:16 +00:00
Dries Buytaert 3d13a38502 - Patch by Goba: fixed incorrect use of drupal_goto(). 2005-11-08 20:57:41 +00:00
Dries Buytaert a8b218827a - Patch by webchick / Kieran / documentation team: improved admin help of core modules! / 2005-11-01 10:17:34 +00:00
Steven Wittens 3fad92fc59 - : Make $links in theme_comment consistent with theme_node (Stefan) 2005-10-20 09:27:36 +00:00
Steven Wittens e83b00d526 - Typo 2005-10-20 08:56:34 +00:00
Steven Wittens 8164ec2f49 - Code style 2005-10-20 08:53:59 +00:00
Dries Buytaert 75fe6b6c0a - Patch by chx, adrian, et al: another batch of form API changes/fixes. 2005-10-11 19:44:35 +00:00
Dries Buytaert 7863be5e82 - Patch 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 7e1527ee61 - Patch : 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 0200ccf4da - Patch by chx: fixed validation check. 2005-10-01 08:43:51 +00:00
Dries Buytaert 1d94bb4a87 - Add some extra options. 2005-09-29 08:04:51 +00:00
Dries Buytaert 45f4bcaa7d - Patch by leafish_dylan: fixed comment pager (broken SQL query). 2005-09-27 18:34:59 +00:00
Dries Buytaert dff2df4809 - Patch by Neil: moved pagers out of table. 2005-09-27 18:10:19 +00:00
Dries Buytaert 67e68fc679 - Patch by Neil: move pagers out of table. 2005-09-24 07:53:26 +00:00
Dries Buytaert 2b3126b2cc Patch by Morbus, chx: conf_init() should strip out port numbers in bootstrap.inc. 2005-09-19 19:13:35 +00:00
Dries Buytaert 06af3e60e5 - Patch by Florian, Uwe: made the recent comments block only show comments on public nodes. 2005-09-19 15:11:05 +00:00
Dries Buytaert dec4ddd3a5 - Patch by Jeremy: provide a more generic interface that can be used
to validate other form submissions, not just comments. Two new functions
  are introduced, form_token() and form_validate(). The first function uses
  a private key and a public key to set a token in a hidden field. The second
  function validates the token. The comment and contect module are updated to
  use these functions.
2005-09-18 12:04:10 +00:00
Dries Buytaert 1dc53d9761 - Patch 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
Dries Buytaert 57a734a989 - Patch by Gerhard: cure array_merge() warning due to invalide menu callback. 2005-09-07 20:45:53 +00:00
Dries Buytaert d9d6a6e05c - Patch 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 494e5ab97c - Renamed 'user comments' to 'comment options' for consistency.' 2005-08-28 15:16:58 +00:00
Dries Buytaert 7b8a409675 - Patch by chx: no ?> add end of files. 2005-08-25 21:14:17 +00:00
Dries Buytaert 29d6660149 - Patch by Robin: don't hard code forms into comment.module. Will be
depricated by form API patch though.  Hopefully helps migration.
2005-08-17 20:07:35 +00:00
Dries Buytaert 7625a4e91a - Patch 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
Steven Wittens e4096e1418 - : Rename check_output() to check_markup(). Needs contrib updates! 2005-07-29 21:06:33 +00:00
Steven Wittens aa2de74fa2 - , , : dead code 2005-07-29 08:18:20 +00:00
Steven Wittens bd055961cd - : Use correct permission for node form comment admin 2005-07-25 09:41:29 +00:00
Dries Buytaert 50dac6f671 - Fixed typo reported by Stefan: theem -> theme 2005-07-20 15:13:12 +00:00
Dries Buytaert 13954f90dd - Modified patch by Moshe: unifies the admin comment form and the usual comment form, similar to what we did for nodes. This resulted lots of duplicate code removal. Also gave administrators the ability to change the author and timestamp of a comment. Also removed comment links from the bottom of the comment preview box (as we did for nodes)
Modifications: fixed breadcrumbs, tidied up delete confirmation page to be consistent with node deletions..
2005-07-19 17:51:59 +00:00
Dries Buytaert 160a1e0ef8 - Patch by chx: simplified node_load(). 2005-07-17 18:29:32 +00:00
Dries Buytaert 02460ed9d8 - Removed tab. 2005-07-05 19:31:36 +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 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 e550f84162 - Patch 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
Steven Wittens 21274fbb94 - : Allow theming of comment previews, like node previews. 2005-05-22 21:14:59 +00:00
Dries Buytaert e5ecab0797 - Patch by Cvbge: fixed typo in documentation. 2005-05-14 17:23:18 +00:00
Dries Buytaert 381853c6b9 - Patch by Robert: make status values in comment.module defined constants for readability. 2005-05-05 20:12:49 +00:00