Commit Graph

99 Commits

Author SHA1 Message Date
David Anderson d786872da7 web tweeak
svn path=/trunk/boinc/; revision=16228
2008-10-17 16:47:02 +00:00
David Anderson 6e62285252 - web: prevent a cross-site request forgery attack
svn path=/trunk/boinc/; revision=16224
2008-10-16 04:02:59 +00:00
David Anderson 9baf78fe5f - web: added copyright and license info to PHP files
svn path=/trunk/boinc/; revision=15758
2008-08-05 22:43:14 +00:00
David Anderson 8062bc1bbd - web: insert() functions return ID
svn path=/trunk/boinc/; revision=15461
2008-06-24 22:20:40 +00:00
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 4eea5bd714 - Add cross-project certificate
svn path=/trunk/boinc/; revision=15347
2008-06-02 15:59:20 +00:00
David Anderson 2381837ba8 - web: add project.inc variables to customize certificates;
add team certificate;
    add links to certificates from user page

svn path=/trunk/boinc/; revision=15316
2008-05-28 21:08:26 +00:00
David Anderson e9451a0bf1 - web: fix errors in translation changes
svn path=/trunk/boinc/; revision=15268
2008-05-21 16:37:11 +00:00
David Anderson 4ef8f7a3dd - web: fix bugs introduced by recent tra() changes.
PLEASE CHECK THESE CHANGES BEFORE SUBMITTING THEM

svn path=/trunk/boinc/; revision=15262
2008-05-20 21:08:52 +00:00
David Anderson 3a00adeb65 - web: add <no_computing> option to config.xml.
If present, don't show anything related to computing.
    Use this for Bossa/Bolt projects, and the BOINC message boards.


svn path=/trunk/boinc/; revision=15228
2008-05-15 22:05:05 +00:00
Rytis Slatkevičius 14e132820f Another typo in user.inc
svn path=/trunk/boinc/; revision=15222
2008-05-15 11:17:40 +00:00
Rytis Slatkevičius 053a6d1abe Fix typo in user.inc
svn path=/trunk/boinc/; revision=15221
2008-05-15 10:03:04 +00:00
David Anderson 929d75eedb - make some strings in user.inc translatable (from Simek)
- close fd 1, not 0, for apps

svn path=/trunk/boinc/; revision=15195
2008-05-13 21:46:50 +00:00
David Anderson f66ec3932b - user web: clear team founder change if requester left team
- user web: check for deleted thread in subcription list
- user web: fix founder change link

svn path=/trunk/boinc/; revision=15070
2008-04-21 14:04:01 +00:00
David Anderson fa69876916 - web: fix bug in handling of links on "forget password?" emails
- web: show number of friends

svn path=/trunk/boinc/; revision=14626
2008-01-28 16:12:28 +00:00
David Anderson 8490214d48 - server/web: the weak auth scheme had a major flaw:
It didn't work on a host's first scheduler RPC
    (when it passes an auth but no host ID).
    How do we look up user in this case?
    The weak auth is not stored explicitly in the DB.
    Solution: include the user ID in the weak auth.
    (this invalidates existing weak auths)

svn path=/trunk/boinc/; revision=14546
2008-01-14 16:32:34 +00:00
David Anderson 2be6f8e53a - Client: add <run_apps_manually> config flag.
This is for debugging apps (currently works only in Unix).
    What it does: when running an app,
    the client does everything except actually fork/exec the app,
    i.e. it sets up the slot dir, creates shared mem segment etc.
    It then continues as if the app were actually running,
    and you can then manually run your app under a debugger
    in the slot directory.
    Note: the client won't notice the termination of your app.
- API, Unix: in situations where the timer thread wants to exit
    (e.g. it notices a missing heartbeat).
    don't directly call boinc_exit(),
    since this touches data structures that the worker thread
    may be using concurrently.
    Instead, set a flag telling the worker thread to call boinc_exit()
    (which it will do from its signal handler)
    This is an attempt to fix problems reported by Bernd;
    I haven't tested it.
- scheduler: add config flag for uploading usage data
- web: show account key and weak account key on user page
- added some code for multithread support (not finished)

api/
    boinc_api.C


svn path=/trunk/boinc/; revision=14542
2008-01-13 00:12:14 +00:00
David Anderson 757c41b1fa - web: add RSS feed for notifications
- make_project: disable community-related periodic tasks
    for newly-created projects

svn path=/trunk/boinc/; revision=14468
2008-01-04 22:59:21 +00:00
David Anderson 0a6753ad0f - web: add "Find friends" link to private friends list
- web: in user search form, give input focus to name field

svn path=/trunk/boinc/; revision=14459
2008-01-02 17:52:21 +00:00
David Anderson b542785c1e - web: My Account page, other user account page, and profile pages
now have community info in a 2nd column on the right.
    This accomplishes two things:
    1) it puts community info in more places;
    2) it provides a reasonable way to format long lists of friends;
        they just continue down the right column.

svn path=/trunk/boinc/; revision=14452
2008-01-01 22:29:10 +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 55c0ee22a0 - web: default for user_links() is to not show profile pic.
Show the pic only in the context of friends list.

svn path=/trunk/boinc/; revision=14444
2007-12-27 18:37:22 +00:00
David Anderson 724e89ebab - web: if user has profile photo, use it instead of head_20.
svn path=/trunk/boinc/; revision=14438
2007-12-23 23:09:10 +00:00
David Anderson 13baee4302 - user web: add "friend" and "notification" features
- user web: code cleanup in Profile area
- GUI RPC: add missing "/" in auth2 RPC

svn path=/trunk/boinc/; revision=14394
2007-12-18 20:28:08 +00:00
David Anderson 235ea7fdea - web: fix PHP errors, add translations strings
svn path=/trunk/boinc/; revision=14302
2007-11-26 03:05:27 +00:00
David Anderson c1ad7d8df5 - web: reorder and reword Your Account page and Forum prefs page;
rename General Prefs to Computing Prefs;
    rename Forum Prefs to Community Prefs
    add Prefs link if user doesn't have email PM notification
- remove forum low/high rating theshold stuff.
    Message rating was a failed experiment.

svn path=/trunk/boinc/; revision=14300
2007-11-26 00:51:00 +00:00
David Anderson 512af1d30e - user web: don't append "/" to URL_BASE.
URL_BASE is assumed to end with a /.
    If you put another /, you end up with // in URLs.
    This leads to a situation where you can have
    one cookie for // and another for / - bad.

    If this causes problems for any projects,
    they should edit their project.inc accordingly

svn path=/trunk/boinc/; revision=14254
2007-11-18 22:42:47 +00:00
David Anderson a49608a028 - user web: allow teams to create their own "team message board".
Team founder and admins have moderator power.
    Anyone can view a team message board,
    but only team members can write to it.
    Users cannot be banished from team message boards
    (due to database limitations).

svn path=/trunk/boinc/; revision=14218
2007-11-15 22:51:05 +00:00
David Anderson 000a3e5594 - user web: code cleanup, deleted unused files
svn path=/trunk/boinc/; revision=14200
2007-11-14 16:03:47 +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
David Anderson bf227ea8b1 - DB: remove "lang" from schema - not used
- DB: added parent_type to forum
- user web: BoincUser uses caching by default
- client: fixed small memory leak in statistics parsing

svn path=/trunk/boinc/; revision=14130
2007-11-10 00:32:42 +00:00
David Anderson 3544a556e9 - user web: enhancements to the "foundership request" feature:
- If a request is pending, notify the current founder
        in red on their Account page.
        (previously there was no notification on the web;
        if the founder didn't get the notification email,
        they'd never find out; and if they read but lost the email,
        they'd lose the URL they needed to visit to decline).
    - Also notify current founder on the Admin Functions page
    - On the team page
        requesting user: show that request is pending, and the deadline.
        founder: show that request is pending, link to respond
        other users: show Deferred if can't make a request yet
    - Say 90 days instead of 60 days where appropriate;
        other text cleanup
- user web: team_change_founder_action.php was generating
    a different name for each element of a radio button group.
    That makes it not a radio button.

svn path=/trunk/boinc/; revision=14117
2007-11-07 23:59:08 +00:00
David Anderson fb8b4ffabb - user web: added the notion of "Team Admin": team members,
appointed by the founder, who have most of the same
    rights as the founder (edit team info, view/remove users).
    They can't, however, change the founder, or select/remove Admins.
- user web: added the ability for founder to delete an empty team
- user web: count/show all team members, not just those with credit
- user web: Team Search returns top team if form fields left blank
- Added db_update.php entry for Eric's banishment_vote stuff

svn path=/trunk/boinc/; revision=14108
2007-11-07 17:23:29 +00:00
David Anderson c35f02e868 - user web: add a general-purpose user search mechanism.
This lets you lookup up users sorted by
        - descending join time
        - descending total credit, or
        - descending RAC
    and lets you filter them by
        - country
        - presence/absence of team
        - presence/absence of profile
    It's implemented in such a way that no more than N
    DB rows are examined
    (i.e. it doesn't necessarily show you all the results)
- PHP database: add enum_fields() member to DbConn and BoincUser.
    This is to select a limited number of fields
    e.g. to make large queries more efficient.
    Also added BoincTeam::lookup_id_cache(); this is an example
    of how to look up items likely to be repeated
    (like teams when you're showing a list of users)

svn path=/trunk/boinc/; revision=14082
2007-11-05 23:55:33 +00:00
Rytis Slatkevičius c1fb4934ec - user web: convert translations from tokens to strings; update Lithuanian translation.
- ops pages: add user removal feature (for spammers).

svn path=/trunk/boinc/; revision=14020
2007-11-02 14:43:02 +00:00
Rytis Slatkevičius 105d6aaae3 HTML fixes;
PHP notice fixes;
home.php made translatable, include Lithuanian translation.

svn path=/trunk/boinc/; revision=13997
2007-10-30 19:36:27 +00:00
David Anderson dc4ca1e5cd - user web: changes to use new DB framework and eliminate PHP warnings
svn path=/trunk/boinc/; revision=13981
2007-10-28 15:03:14 +00:00
David Anderson 7302f02544 - user web: added new framework for DB access from PHP.
Here's how things should eventually be:
    - inc/db_conn.inc defines DbConn, a PHP class representing
        a connection to a database with
        various generic operations (update, insert etc.).
        DbConn prepends the DB name to table names,
        so you don't have to select a DB;
        this means you can access multiple databases
        (e.g. BOINC and Bossa) and use persistent connections.
        ALL MYSQL-SPECIFIC CODE WILL EVENTUALLY BE HERE.
    - inc/boinc_db.inc defines classes BoincUser, BoincTeam etc.,
        representing the various BOINC DB tables.
        All access to the DB should use these classes.

    When you use this framework, no initialization calls are needed.
    db.inc is deprecated and should eventually be removed.

    I changed get_logged_in_user()
    and all team-related code to use this framework.
- user web: show team founder link to "management functions"
    even if they're not currently a member;
    allow team founder to perform all operations even if not a member.
- turned on E_ALL error checking,
    and fixed a bunch of warnings
    and a couple of bugs ($team, not team)

- database: update schema/constraints for team fulltext search
- user web: forgot to change Serbia and Montenegro to Serbia

svn path=/trunk/boinc/; revision=13968
2007-10-26 21:14:35 +00:00
Rytis Slatkevičius c70f01b64d Fix unclosed HTML tag
svn path=/trunk/boinc/; revision=13877
2007-10-17 16:35:22 +00:00
David Anderson d09bf92af3 - user web: add format_credit_large() function to show
credit in situations where it's likely to be large (e.g. team totals)

svn path=/trunk/boinc/; revision=13789
2007-10-07 19:27:59 +00:00
David Anderson 066f01dc26 - Terminology in user web and client:
"task" instead of "result";
    "computer" instead of "host";
    "scheduler request" instead of "scheduler RPC"
    "access to Internet" instead of "access to reference web site"

svn path=/trunk/boinc/; revision=13774
2007-10-04 17:30:28 +00:00
David Anderson 2272891035 - user web: add "team search" page, which does a multi-criteria
search (keywords, country, type).
    Have the new-user scenario route the user through this page.
    Also, link to it rather than team.php for existing users.
- user web: use cookies rather than URLs to identify new users,
    and show "Welcome to X" when they reach their user page.
- user web: don't show user intermediate page for join/quit team.
    Just take them to their user page.

svn path=/trunk/boinc/; revision=13731
2007-10-02 03:19:03 +00:00
David Anderson 12ed1228d2 - user web: code cleanup related to user creation.
Make a single function that creates users and cleanses args.

svn path=/trunk/boinc/; revision=13216
2007-07-25 15:11:14 +00:00
Rytis Slatkevičius b04aeea7d6 user web: make sure that all links that have URL_BASE have slashes after it. This makes a slash in the end of URL_BASE definition in project/project.inc no longer necessary.
svn path=/trunk/boinc/; revision=13106
2007-07-05 19:37:33 +00:00
Rytis Slatkevičius 56871331a5 - Fix #189: add links to send PMs below user name in the forum, in the user overview and in user profile page.
- Change "CVS" into "SVN" in the CVS version tracker (automatically generated comment in the pages showing page revision number)

svn path=/trunk/boinc/; revision=12666
2007-05-15 10:06:38 +00:00
Rytis Slatkevičius 4332736ae9 Private message functionality for the forums.
NOTE: needs database update.

svn path=/trunk/boinc/; revision=12499
2007-04-29 14:22:28 +00:00
David Anderson 49afbfe4e3 *** empty log message ***
svn path=/trunk/boinc/; revision=12348
2007-04-11 22:46:42 +00:00
David Anderson 33a4319a42 *** empty log message ***
svn path=/trunk/boinc/; revision=12336
2007-04-09 17:58:07 +00:00
Rytis Slatkevičius aa396080c0 Fix XSS vulnerability in the forum
svn path=/trunk/boinc/; revision=12055
2007-02-08 19:54:05 +00:00
David Anderson 7b66693f21 *** empty log message ***
svn path=/trunk/boinc/; revision=11995
2007-01-29 18:15:16 +00:00