Commit Graph

81 Commits (89db09746fbcebeb3f5a886792d1287fb9d75818)

Author SHA1 Message Date
Dries Buytaert 869a91b72e - Patch #11505 by Steven: 'my account' information is not saved.
+ Drupal 4.4 stored profile data in the serialized user->data column. Drupal 4.5 stores profile data in tables (but user->data is still available and used for other stuff, like locale or themes).  The update from 4.4 to 4.5 didn't remove the old data from the user->data column properly, because there is no mechanism in user_save to do so (it did try to unset the fields, but this has no effect).

  + On registration, hook_user('insert') is invoked after saving the data column. This means that any module-specific data is put into the data field. We cannot move hook_user('insert') higher up, because before that point, we do not have a complete $user object yet.
2004-10-16 16:59:59 +00:00
Steven Wittens aaa214e4a8 #6595: Unifying profile.module textbox widths with user.module. 2004-10-13 20:35:46 +00:00
Steven Wittens c6281c464c Profile.module: removing incorrect use of strtolower which messes up UTF-8 data. 2004-09-20 23:42:11 +00:00
Dries Buytaert 2b9aaf7159 - Bugfix: making changes to the user profiles should flush the cache. 2004-09-19 13:33:08 +00:00
Dries Buytaert 6dbd0bcfb4 - Patch #6500 by Mathias with help from Steven: made it possible to add fields to the registration form. This feature used to exist. 2004-09-19 13:28:11 +00:00
Dries Buytaert 5c7983c4de - Patch #8179 by JonBob: reintroduced menu caching. 2004-09-16 07:17:56 +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
Steven Wittens 6a380525d4 #10012 - Profile.module:
- Restoring broken update path.
- Adding birthday/date function back, with update path.
- Show private fields when viewing your own profile, or for admins.
- Do not allow browsing of private fields for non admins (403)
- Throw a 404 for browsing unbrowsable fields, rather than an SQL error
- Fixing input processing: nothing is filtered twice anymore, and I replaced several strip_tags with specialchars (more flexible).
- Minor admin UI tweaks + added friendly field type names.
2004-08-14 11:54:31 +00:00
Dries Buytaert d4a8bd5877 - Modified patch #9924 by njivi: added a basic member list to the profile module. (If this deprecates the memberlist module, it ought to be deprecated.)
I removed the permission njivi introduced and made the page title match the link title.
2004-08-12 22:03:31 +00:00
Dries Buytaert 4cad8d5c31 - Patch #9865 by njivy: avoid mangling %'s in the profile SQL query. 2004-08-09 05:40:16 +00:00
Dries Buytaert 90581e7349 - Patch #9866 by njivy: when the links are generated for each item in a list-type profile field, double quotes in the item name can break the link. To fix this, this patch gives drupal_specialchars() the ENT_QUOTES parameter to convert quotes into HTML entities. This fix is also applied to selection-type profile fields which can have the same problem. 2004-08-08 16:19:32 +00:00
Dries Buytaert 702a057683 - Patch #9478 by JonBob: allow printf-style arguments in pager_query.
Currently pager_query() is the black sheep of the database query family, because it does not allow for printf-style arguments to be inserted in the query. This is a problem because it introduces developer confusion when moving from an unpaged query to a paged one, and it encourages substitution of variables directly into the query, which can bypass our check_query() security feature.

  This patch adds this ability to pager_query(). The change is backwards-compatible, but a couple calls to the function in core have been changed to use the new capability.
2004-07-25 14:25:42 +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 bf42dddea7 - Usability improvement: users can also separate 'list items' (i.e. favorite
movies) using a comma.  Only few users actually read the form description,
  it seems ...
2004-07-08 15:17:21 +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
Steven Wittens 72155f8bbf Using drupal_specialchars() instead of htmlentities(). htmlentities() is not UTF-8 safe. 2004-06-27 22:09:12 +00:00
Dries Buytaert 1b1c47025a I refactored quite a bit of the user.module:
$ diffstat user.patch
database/database.mysql |    4
database/database.pgsql |    2
database/updates.inc    |   10 -
modules/block.module    |   20 +-
modules/locale.module   |    9
modules/profile.module  |  108 +++++++----
modules/system.module   |    8
modules/user.module     |  456 +++++++++++++++++++-----------------------------
8 files changed, 289 insertions(+), 328 deletions(-)

More functionality, less code.  Here is a list of the changes:

- Some user API changes:
   + When $type is 'form', you have to return an associative array of groups.  In turn, each group is an array with a 'title', 'data' and 'weight'.
   + A new $type has been added, namely 'categories'.  User settings can be organized in categories.  Categories can be sorted, as can the groups within a category.  (Ordering 'categories' is somewhat broken due to a bug in the menu system.)

- The 'my account > edit' page will use subtabs for each 'category'.  Read: you can break down the account settings into multiple subpages.

- Profile module improvements:
   + Added support for private fields to the profile module!
   + Improved workflow of profile administration pages.
   + Improved the form descriptions.

- Code improvements:
   + Unified user_edit() and user_admin_edit().
   + Unified and cleaned up the validation code.  Fixed some validation glitches too.
2004-06-27 19:10:52 +00:00
Dries Buytaert fa2be0b8f0 - Fixed administration pages being broken due to tabs changes, improved form
handling and form descriptions and fixed an incorrect title.
2004-06-22 20:33:12 +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 fbbf510511 - Patch #8105 by mathias: made the menu system aware of path aliases. 2004-06-01 21:58:46 +00:00
Dries Buytaert 7f08110a5e - Improved form handling.
+ Introduced two new functions:
      1. form_set_error($name, $message): files an error against the form
         element with the specified  $name.
      2. form_has_errors(): returns true if errors has been filed against
         form elements.

  + Updated the form handling:
       1. The form_ functions will add 'class="error"' when a form field
          has been found to be erroneous.
       2. The error message is passed to theme_form_element() when the
          particular form field has been found to be erroneous.

  + I updated the user and profile module to take advantage of these new
    functions.

  + IMPORTANT: the _user() hook changed.  The 'validate' case should no
    longer retun an error message when something goes wrong but should
    set it with form_set_error().
2004-05-31 09:40:56 +00:00
Dries Buytaert 8c75cda0b1 - Added some error checking to the profile module. 2004-05-28 20:02:11 +00:00
Dries Buytaert 0e6221a192 - Patch #7585 by Gerhard: extra data added by profile.module to the user
object got saved in the user's data column even if there is a dedicated
  table for that information.
2004-05-05 21:17:25 +00:00
Kjartan Mannes dfd66f998d - Fixed sitewide timezone settings not being saved.
- Making sure profile fields are saved properly.
2004-04-29 23:27:15 +00:00
Kjartan Mannes 7e017fce0f - Applied patch #6552: Put back register_form and register_validate callbacks in user.module.
- Fixed bug #7406: User delete hook incorrect params.
2004-04-29 22:39:55 +00:00
Dries Buytaert dc8a68ea28 - Patch #6791: mark required fields. Modified patch by Michelangelo. 2004-04-24 15:39:31 +00:00
Dries Buytaert 7231c88a32 - Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they
  can define 404 pages now.

  This needs to be documented in the "Changes since / migrating to ..."
  pages.
2004-04-21 13:56:38 +00:00
Dries Buytaert 10bdb51c37 - Patch by JonBob/Jonathan: reworked the menu system so that menus are
configurable!  Menu items can be disabled, repositioned, added and
  so on.

  Upgrading to requires you to run update.php.

  This functionality depricates some of the 'navigation modules' in the
  contributions repository.  Furthermore, modules can now 'suggest'
  menu items and site adminstrators can choose to enable them.  Modules
  in the contributions repository should try to take advantage of this.
2004-04-15 20:49:42 +00:00
Dries Buytaert 6e4d93b943 - Patch 6751 by TDobes: fixed call-by-reference problem 2004-03-29 18:19:10 +00:00
Dries Buytaert 5f17ad3c2d - Profile module improvement:
* Made it possible to set certain fields as 'required'.

  To do:
   * Mark them as required visually.
   * Add required fields to the subscription page.
2004-03-27 14:50:56 +00:00
Dries Buytaert 3fbfc52030 - Patch #6632 by Moshe: added missing brackets around table name. 2004-03-27 11:56:01 +00:00
Dries Buytaert 754f2ac26a - More profile module improvements:
+ Updated the _user() hook's "$type == 'view'" case to match the
     "$type == 'edit'" case.  That is, both have to return an associtive
     array of the format array('category' => 'fields').

   + Updated the profile pages to group fields by category.  Made possible
     thanks to the above change.

   + Moved logic out of the theme_ functions.
2004-03-21 14:28:15 +00:00
Dries Buytaert f43cd3bb33 - More profile module improvements:
+ Add a new field type: 'list'.
2004-03-21 12:46:06 +00:00
Dries Buytaert 93cf70d72e - Profile module improvements: added a URL-type field to the profile module.
We can use this for the 'URL of homepage' field on drupal.org.  URL fields
  are rendered as links and are being validated.
2004-03-21 10:28:10 +00:00
Dries Buytaert b5c441a926 - Profile module improvements:
+ Made it possible to define the page title of the user listing pages.

   + Used form_group()s for the profile administration page.

   + Fixed bug in database/updates.inc.
2004-03-20 19:41:42 +00:00
Dries Buytaert 576968c471 - Patch #6406 by TDobes: fixed typos in profile/user module. 2004-03-15 20:09:54 +00:00
Dries Buytaert 73ab05f4e6 - Added a CVS Id 2004-03-13 06:10:20 +00:00
Dries Buytaert 2101f6c454 - Rewrote the profile module:
+ Added a 'created' field to the users table and renamed the 'timestamp'
     fied to 'changed' (cfr. node table).  Update.php will try to determine
     a 'created' timestamp for existing users.

   + The profile module no longer uses serialized data but has its own set
     of tables.  Known existing profile data is migrated by these new tables.
       TODO: migrate the birthday field.

   + The profile fields can be grouped, and within each group, profile fields
     can be sorted using weights.

   + The profile pages can be themed.

   + The profiles can be browsed based on certain properties/settings.

   + Change the _user hook: (i) 'private_view' and 'public_view' are merged
     into 'view' as there are no private fields and (ii) 'edit_form' has
     been renamed to 'edit'.

   + Avatar handling has been refactored and is now part of the user module.
     The users table has a dedicted 'picture' field.

   + Simplified the way themes should use display/visualize pictures or
     avatars.

   + Made it possible for administrators to replace or delete avatars.

   + ...

  I hope this make for a good base to build on collectively.
2004-03-11 20:33:59 +00:00
Dries Buytaert cfd7751653 - Patch 5969 by Chris: improved the profile module's context sensitive help text 2004-02-21 21:26:57 +00:00
Dries Buytaert bd78422715 - Patch 5592 by Goba: let drupal_map_assoc() rule. :-)
- Renamed CHANGELOG to CHANGELOG.txt for Windows uses.
2004-02-15 15:19:36 +00:00
Dries Buytaert e28bbf6739 - Batch two with profile module improvements:
+ Reworked the 'account administration' page.
   + Fixed bug in the 'edit account' page.
   + Removed some dead code from the system.module.
2004-02-07 16:59:34 +00:00
Dries Buytaert 5a8129e0fb - First batch of profile module improvements:
+ Tidied up the profile configuration page: grouped form elements.

   + Tidied up the block configuration settings: removed hard-coded
     table.

   + Changed the profile API to return the preferred group name, and
     changed the user module to group settings.  Modules implementing
     the _user hook will need to be udpated.

   + Removed register_form and register_validate for now.
2004-02-07 16:18:46 +00:00
Dries Buytaert a8b8c247db - Patch #5021: clean up URLs in _help texts. Patch by UnConeD. 2004-01-11 20:31:26 +00:00
Dries Buytaert 80f34e5ab0 - XHTML improvements: <b> -> <strong>. Patch by Stefan. 2003-12-29 17:14:27 +00:00
Dries Buytaert baaa21e131 - Tidied up some inconsistencies in the code: scripts/code-style.sh is your friend. 2003-12-28 10:47:33 +00:00
Kjartan Mannes 41d2b2a349 - Fixed fileuploads for nodes failing without preview. 2003-12-27 19:21:48 +00:00
Kjartan Mannes 46f8f14322 - Fixed switch in file_create_url().
- Fixed profile module not extracting mime type.
- Improved file matching in profile module.
2003-12-27 14:28:23 +00:00
Dries Buytaert 15f289a8f0 - Added file handling. Work by Kjartan. 2003-12-26 23:03:21 +00:00