Commit Graph

8 Commits

Author SHA1 Message Date
David Anderson d403a14e42 - web: cleaned up logic of string processing.
There are two aspects:
    1) undoing magic quotes (if it's being used).
        This must be done for all GET and POST string inputs.
        It is now done automatically by get_str() and post_str().
        The places that refer to $_GET and $_POST directly
        must do it themselves using undo_magic_quotes().
    2) Escaping user-supplied strings before using them in DB queries.
        This is done by process_user_text()
        (which should be renamed db_escape_string()).
        The new principle:
        call process_user_text() in the function that does the DB query
        (not at any higher level).


svn path=/trunk/boinc/; revision=15389
2008-06-11 19:36:10 +00:00
David Anderson d764eb5873 - web: clean up stuff related to stripslashes():
1) it's not correct to apply stripslashes() to all form input.
        That should be done only if magic quotes is on.
        I fixed this by adding a function undo_magic_quotes()
        that does the right thing.
    2) There's no reason to strip backslashes from user-supplied text
        (forum titles and bodies, private messages, passwords etc.)
        I'm not sure why this was being done.
        It prevented messages from containing backslashes.

svn path=/trunk/boinc/; revision=15364
2008-06-05 20:32:21 +00:00
David Anderson f183b6f47f - web: add general-purpose notification mechanism.
Users can choose whether to get 1 email per notification,
    a daily "digest" email, or no email.
    (All notifications are shown on the Account page).
    Currently used for:
    - Friend requests and confirmations
    - Posts to subscribed threads
    - Private messages

    NOTE: To implement the "daily digest" feature, projects must add
    a periodic task for html/ops/notify.php to config.xml
- web: have project_footer() generate links for
    Account Page and Message Boards as well as Home
    NOTE: projects that want this change
    will have to modify their own project.inc.

svn path=/trunk/boinc/; revision=14447
2007-12-30 22:02:16 +00:00
David Anderson da3671f0de - user web: when showing UOTD on front page,
strip HTML tags from text (e.g. to remove photos)
- user web: show_image(): separate title (tooltip text)
    from "alt" (replaces image if images disabled).
    The latter must be terse.
- user web: show_button(): make it work even if Javascript disabled

svn path=/trunk/boinc/; revision=14294
2007-11-23 21:05:52 +00:00
David Anderson 9041fd8507 - user web: use forum prefs (e.g. display images as links)
when displaying PMs.  fixes #497

svn path=/trunk/boinc/; revision=14264
2007-11-20 00:55:35 +00:00
David Anderson f978ce2143 - user web: fix PM mass deletion
svn path=/trunk/boinc/; revision=14252
2007-11-18 22:17:39 +00:00
David Anderson 0616e75a02 - user web: update other code to use new-style DB interfaces
svn path=/trunk/boinc/; revision=14164
2007-11-12 22:28:17 +00:00
David Anderson a18dfc55a7 - user web: revise forum code to use new-style DB interface
svn path=/trunk/boinc/; revision=14160
2007-11-12 20:57:15 +00:00