Commit Graph

566 Commits (ca9f0fab45823c49947b218587b9c9ef92aff60c)

Author SHA1 Message Date
Dries Buytaert fd96728f3c - Second batch of form API fixes by chx. 2005-10-09 10:39:15 +00:00
Dries Buytaert 27625fcf83 - Patch #31341 by kbahey: delete a user's session when the user is deleted. 2005-10-07 06:53:25 +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 c267c749e7 - Patch #32669 by DriesK: added an 'administer access control' permission.
In several setups, one wants to grant the 'administer users' permission to certain roles (for example to forum admins), however without allowing those users to change permissions on the 'access control' page, and without allowing them to change the users' roles (so that they can't, for example, promote themselves to admin).
2005-10-01 13:42:00 +00:00
Dries Buytaert 67e68fc679 - Patch #28786 by Neil: move pagers out of table. 2005-09-24 07:53:26 +00:00
Dries Buytaert ce3b6d4eee - Patch #28301 by jjeff: show tooltip when hovering over a permission. Temoprary
solution until we have a better permission page.
2005-09-15 21:45:21 +00:00
Dries Buytaert 4005922332 - Patch #31123 by Ber: make it easier to theme the user profile pages. 2005-09-14 21:16:00 +00:00
Dries Buytaert cead2e37b1 - Patch #26033 by m4avrck: fixed PHP5 warnings (call by reference) 2005-09-08 19:46:05 +00:00
Dries Buytaert f3cb254cb7 - Patch #23536 by chx: custom registration fields should appear on admin/user/create. 2005-09-08 19:32:31 +00:00
Dries Buytaert 013b73e6ec - Patch #30122 by m3verick: changed include_once()'s to include "./$file"
for performance's sake.
2005-09-08 19:19:01 +00:00
Dries Buytaert 16262e03d5 - Patch #28320 by Neil: improved the HTML/CSS of the user login block. 2005-09-07 20:56:00 +00:00
Dries Buytaert bcd59aa0dd - Patch #24617 by Morbus: fixed incorrect access checking. 2005-09-07 20:41:38 +00:00
Dries Buytaert 298b403bf1 - Patch #18252 by tostinni: don't try creating the picture directory when picture support is not enabled. 2005-09-06 19:22:50 +00:00
Dries Buytaert 7f08b766aa - Patch #30382 by Robert: removed unused variable by ''. 2005-09-06 19:10:50 +00:00
Dries Buytaert 7b8a409675 - Patch #29385 by chx: no ?> add end of files. 2005-08-25 21:14:17 +00:00
Dries Buytaert 78317bca79 - Patch #27897 by kubaZygmunt: fixed PHP warning. 2005-08-11 13:52:44 +00:00
Dries Buytaert 192dcd04ba - Patch #18778 by Gerhard/Olen: sort users by creation date rather than user ID. 2005-08-10 20:46:29 +00:00
Dries Buytaert 5270f7fd88 - Patch #28599 by Cvbge: fixed typo in documentation: 'user' -> 'used'. 2005-08-10 20:38:57 +00:00
Steven Wittens 64299d7455 - #27852: redirect to user edit page on first log-in 2005-08-05 01:18:39 +00:00
Steven Wittens 3feef48da2 - #28154: remove useless /view from user results 2005-08-03 23:23:48 +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
Steven Wittens 22479d8761 - Add some Unicode checks to username validation 2005-07-31 21:54:39 +00:00
Steven Wittens 2a561f3bc1 - #16705: Make user_access always return a boolean. 2005-07-29 21:34:56 +00:00
Steven Wittens 8de43c320a - #27694: Correct username validation. 2005-07-29 07:18:36 +00:00
Steven Wittens 11a4aba9a6 - #26688: Add mbstring support to Drupal and clear up string handling fuzzies. 2005-07-25 20:40:35 +00:00
Dries Buytaert 7480e9ac3c - Modified patch #27131 by DriesK: removed some cache_clear_all()s. 2005-07-23 05:53:43 +00:00
Steven Wittens 02ca763ea0 - Fix PHP notice (killes) 2005-07-20 00:50:34 +00:00
Dries Buytaert 7ee24ccfe4 - Patch #27062 by nysus: improved the help text of the 'access control' page.
Generally improves readability; gets rid of technical jargon; provides
  concrete example; provides suggestions for how permissions can be used.
2005-07-19 17:57:55 +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 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 5365db7e07 - Patch by Robert: fixed problem with username blocking. 2005-06-23 19:26:51 +00:00
Dries Buytaert e7cc200eeb - Patch by deekayen: roll back permission patch. 2005-06-23 05:10:38 +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 22ea50dfec - Patch #21566 by deekayan: fixed user_access() function returning a string and not a boolean. Also improves performance of user_access(). 2005-06-21 18:45:30 +00:00
Dries Buytaert 8f82f92a10 - Patch #25398 by Ber: drop.org -> drupal.org. 2005-06-21 18:22:26 +00:00
Dries Buytaert 4c77761efb - Patch #3962 by deekayen: improved error message when a blocked user attempts to login. 2005-06-21 18:21:08 +00:00
Dries Buytaert b3336096a3 - Patch #24766 by deekayen (David): fixed user module showing the epoch instead of 'never'. 2005-06-19 09:06:02 +00:00
Dries Buytaert 1474632aa0 - Patch #24135 by Moshe: made it possible to ban visitors based on hostname/IP. Banning visitors can either be done from the 'access control' pages, or directly from the statistics pages. This feature is very convenient to block badly behaving crawlers. 2005-06-07 18:54:37 +00:00
Dries Buytaert 263b7e230d - Fixed registration bug. 2005-06-01 20:21:35 +00:00
Dries Buytaert f68f9111ca - Patch #23633 by Moshe: improve grouping in default profile page. 2005-05-26 19:03:05 +00:00
Dries Buytaert e579f4d407 - Patch #23588 by Ber: fixed incorrect call to theme_user_picture. 2005-05-25 19:54:49 +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 0de88f50ba - Patch #23383 by Ber: added theme_user_list() function. 2005-05-23 21:23:04 +00:00
Dries Buytaert 2a744f8950 - Patch #11791 by kps: trim passwords to avoid copy-paste mistakes. 2005-05-21 11:57:59 +00:00
Dries Buytaert cdec2f7e3e - Patch #16303 by Gerhard: fixed some warnings. 2005-05-21 11:33:03 +00:00
Dries Buytaert 2b7f504dc8 - Added the ability to track page generation times in the statistics module.
(Made some improvements as per the suggestions in the issue.)

- Added extended timer implementation.
2005-05-12 11:21:35 +00:00
Dries Buytaert a1a3d53caa - Patch #22262 by Robert: removed extra comma from SQL query. 2005-05-07 22:37:26 +00:00
Dries Buytaert 39d0fe9a38 - User module improvements: added an 'access' column to the users-table to
keep track of the user's last access. In turn, this allowed me to:

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

  2. Correct the "Last access" column in the user administration overview
     table.  The presented data was not accurate, which led to the column
     being removed.  You can now sort users by 'last access'.
2005-05-07 11:39:54 +00:00
Dries Buytaert 65fa603fc5 - Removed the user IDs from the users administration table and added a 'Member for' column. 2005-05-05 11:55:52 +00:00
Dries Buytaert 92b10946ac - Patch #21686 by Robin Monks: added two missing t() functions. 2005-05-01 09:34:17 +00:00
Dries Buytaert 8bedd376fe - Patch #21344 by Moshe: admin/user/create results in a blank page 2005-04-30 09:27:19 +00:00
Steven Wittens c99f000c6f - #20910: print -> return 2005-04-24 22:09:16 +00:00
Dries Buytaert a76a1e1f3f - Patch 20910 by chx: centralize print theme page. 2005-04-24 16:34:36 +00:00
Dries Buytaert e2b256dcf6 - Patch #18719 by Jose: reworked the 'request new password' functionality. 2005-04-24 11:43:08 +00:00
Dries Buytaert 52826b0052 - Patch #20690 by jhriggs: editing a user does not clear the menu cache. 2005-04-18 20:43:26 +00:00
Dries Buytaert db8dfcae39 - Patch #20457 by Morbus: removed hardcoded <br /> 2005-04-13 19:44:31 +00:00
Dries Buytaert 1bc5fe183b - Patch #20058: move user_module_invoke('load', $array, $user) after loading of roles. 2005-04-13 18:02:48 +00:00
Dries Buytaert b1392fb143 - Patch #20396 by Junyor: fixed broken watchdog message in user module. 2005-04-12 21:26:18 +00:00
Dries Buytaert bbb746b814 - Patch by Gerhard: refinements and bugfixes for the 'access user profiles' patch. 2005-04-12 18:32:00 +00:00
Dries Buytaert 2bd8840e3b - Patch #20349 by Gerhard: drop.org -> drupal.org 2005-04-12 05:13:17 +00:00
Steven Wittens 23bccfd1c8 - #4166: Respect 'access userlist' permission for profile data. 2005-04-11 22:48:27 +00:00
Steven Wittens bc44805f3c - #20338: Improve api docs on $user field deletion. 2005-04-11 22:31:12 +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
Steven Wittens be14203534 - #18817: Clean up plain-text checking (see drupal-devel!) 2005-03-31 09:25:33 +00:00
Steven Wittens c3f1f7345e - #18939 (Stefan): Always use paragraph tags around page help text. 2005-03-18 07:07:04 +00:00
Dries Buytaert f4b5313483 - Patch #18983 by Ber: small code improvement. 2005-03-16 19:34:13 +00:00
Steven Wittens ebc7c0dfe0 - Fix missing parameter in user.module 2005-03-05 18:03:16 +00:00
Steven Wittens ad973366ab - Fix overzealous session wiping 2005-03-04 03:43:41 +00:00
Steven Wittens 198ec98f75 #18329: Unify confirmation messages (and make them themable) 2005-03-03 20:51:27 +00:00
Dries Buytaert 84268b3a34 - Patch #17770 by chx: added missing NULL-arguments to _user() hook. 2005-03-01 20:21:08 +00:00
Steven Wittens ea08f062b2 - Fix broken session deleting on account blocking. 2005-03-01 18:44:41 +00:00
Steven Wittens 9803bc4321 - Delete a user's sessions when blocking his/her account. 2005-02-28 18:13:12 +00:00
Dries Buytaert 174d22dbbb - Patch #17931 by Neil: fixed bug in access rules page:
* split up the menu callback for editing/adding/deleting rules
  * improved the delete message
  * fixed a double page printing bug
2005-02-28 16:41:15 +00:00
Steven Wittens cd552adee0 More search usability improvements!
- Clean URLs: search/type/keywords e.g. "search/node/drupal release". The search
  form is POST submitted, but drupal_gotos to a GET page. This makes it easy to
  copy/paste search URLs, and makes the pager a lot cleaner.

- Remember the search keywords when switching between the search tabs. This is
  done through the same GET URLs rather than the session, so it does not mess up
  between multiple browser tabs.

- Report which keywords were ignored because they were too short.

- #820: Provide search block

- Treat multiple wildcards in a row as one
2005-02-27 02:15:57 +00:00
Steven Wittens d2bfc18880 #17477: Remove dependency on GD for avatars. 2005-02-22 06:18:23 +00:00
Dries Buytaert 5b7ecb8650 - Patch #17208 by asimmonds: help text fixes:
- permissions menu link updates in a number of modules help
    - anchor link fix in distributed auth help
    - "my account" link fix in user help
    - spelling correction in tracker.module help

- I also changed 'admin/access/perms' to 'admin/access/permissions'.
2005-02-12 07:51:14 +00:00
Dries Buytaert 16993da34f - Fixed two broken URLs in the help text. 2005-02-10 19:19:43 +00:00
Dries Buytaert d77ac14c31 - Patch #16972 by Neil: don't use align operations. Removed hard-coded CSS. 2005-02-08 19:28:33 +00:00
Dries Buytaert fbec279e4c - Patch #16246 by Moshe: added mechanism to direct the user back to the referring page after completing a form.
(Moshe: the patch against node.module failed to apply.)
2005-02-01 19:45:58 +00:00
Dries Buytaert 7ccc5a6b1b - Patch #16358 by James: added toolkit to enable better image handling. The avatar code and the upload module have been updated to take advantage of the new image API.
There are 5 main functions that modules may now utilize to handle images:

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

Contribution modules will now be able to rely on these base manipulation functions to offer additional functionality (such as image nodes, photo galleries, advanced image manipulation, etc).
2005-02-01 16:27:43 +00:00
Dries Buytaert 993ea0c6c5 - Patch #16111 by chx: generalized node_rewrite_query to db_rewrite_query. 2005-01-29 22:02:37 +00:00
Steven Wittens cc3fd1715f - #16271: Clean up Admin - users - configure. 2005-01-28 20:49:00 +00:00
Dries Buytaert b4d516f423 - Patch #13184 by JonBob: changed the 'my account' menu to a 'dynamic menu' so it can't be edited. 2005-01-27 21:34:38 +00:00
Dries Buytaert 7f4be97763 - Patch #16176 by Drumm based on mockup from Kika: improve access rules UI. 2005-01-25 20:27:09 +00:00
Dries Buytaert d9382d8c15 - Patch #16028 by Goba: added class="form-password" to the password form. 2005-01-23 15:39:49 +00:00
Dries Buytaert 9252be8bc0 - Consistency glitch: 'operations' => 'Operations'. 2005-01-22 12:10:16 +00:00
Dries Buytaert a6e7e9c104 - Patch #15566 by drumm: must specify a userneme or password error happens when it shouldn't. 2005-01-14 15:15:19 +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 0f91dce414 - Patch #15247 by Drumm: simplified the logout code. 2005-01-07 18:01:13 +00:00
Dries Buytaert 7f890fd1b1 - Patch #15184 by drumm: clean up user password mailing.
+ After mailing the password, set a message and go to the login form (was print a message as the entire page).
  + Provide feedback if neither field was filled in.
  + Make it a full menu callback instead of going through user_page().
  + Fixed some indentation.
  + Changed some double quotes to single quotes.
  + Made sure all if statements have {}.
2005-01-06 20:38:19 +00:00
Dries Buytaert 9f2952aa3f - Bug #14609: improved the status messages and avoid empty roles being saved. 2004-12-22 08:51:39 +00:00
Dries Buytaert 2b17b3a966 - Patch #13907 by Neil: less ways to set the page title.
* Less logic in theme code.
   * Encourages use of the menu system.
   * Easier to find where a title or breadcrumb comes from in other people's code because there are less places to look. Look in menu and then grep for the appropriate set function. Looking for calls to theme_page() is hard because there are too many of them.
   * Very slightly more efficient.
2004-12-15 21:19:42 +00:00
Dries Buytaert 6e3eb60aab - Removed some cruft: left-over xxx_help_page() functions. 2004-12-11 14:13:24 +00:00
Dries Buytaert 5520513879 - Modified patch by Goba: don't save user roles in the serialized data field of the user table. 2004-12-08 19:41:16 +00:00
Dries Buytaert 1365740f6e - Patch #14006 by Neil:
* user/view/$n has been replaced with user/$n.
   * More blank lines in the right places.
   * Prevent unwanted case fallthrough.
2004-12-07 07:24:46 +00:00
Dries Buytaert 95610bdd6c - Patch #13647 by Goba:
1. Fixed broken watchdog calls: two watchdog calls omitted the type parameter, and thus injected logs into the type field, instead of the message field.
   2. Removed t() functions from user contributed content.
2004-11-29 17:52:35 +00:00
Dries Buytaert 29337ad8bb - Patch #13581 by Steven: Db_query() allows a variable amount of parameters so you can pass the query arguments in. There is however an alternative syntax: instead of passing the query arguments as function arguments, you can also pass a single array with the query arguments in it. For example the following two statements are equivalent:
db_query($query, $a, $b, $c);
db_query($query, array($a, $b, $c));

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

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

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

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

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

and

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

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

This patch is important because many people avoid the call_user_func_array() method and put data directly into the db query.  This is very, very bad because the database prefix will be applied to it, and strip out braces. It's also generally bad form as you have to call check_query() yourself.  With the new, documented syntax, there is no more excuse to put data directly in the query.
2004-11-29 13:13:29 +00:00
Dries Buytaert 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 e19a3cf42d - Patch #12363: fixed glitch in user_access() as pointed out by TDobes. 2004-11-23 21:52:13 +00:00