Commit Graph

42 Commits

Author SHA1 Message Date
David Anderson 364662f1dc web: add missing _mysql_fetch_array() definition 2015-07-02 10:55:59 -07:00
David Anderson c587219a5f web: support MySQL server on non-default port; from Tomi Asp. 2015-01-15 09:10:22 -08:00
David Anderson b9ba016d8d admin web: mysqli fix 2014-10-09 11:44:46 -07:00
David Anderson 2ea2077b2b web: change NO_MYSQLI feature to fix recursive-include problems
I seemed to be playing whack-a-mole with problems related to
recursive inclusions of project.inc.
Solve this by changing how the use of mysqli can be inhibited:
instead of defining NO_MYSQL in project, put <no_mysqli/> in config.xml
2014-09-28 12:15:26 -07:00
David Anderson 1c60e467a7 web: add page (per_app_list.php) to show top users/teams by app
Notes:
- it's per app, not per sub-project; that would have been harder
- it only shows the top 20

Also: shuffle code to reduce recursive includes.
2014-09-28 08:11:51 -07:00
David Anderson 04686222f5 web: tweak to last commit; to not use mysqli_*, define NO_MYSQLI 2014-09-24 11:25:28 -07:00
David Anderson 3abed383e5 web PHP code: use mysqli everywhere if available
Change all the PHP code to use _mysql_query() instead of mysql_query()
(and similar for other functions).
_mysql_query() uses the mysqli API if available, else the old API.

Going forward, all PHP code should the DB abstration layer if possible;
else it should use the _mysql_* functions.
2014-09-04 12:00:09 -07:00
David Anderson a243e19bdc web: replace lookup_* functions with their DB API equivalents
also:
- fix bug in db_cleanse.php
- replace some uses of deprecated mysql_* API
2014-06-23 18:29:20 -07:00
David Anderson 278f3fd370 web: use new DB API here and there; should be no visible changes 2014-04-24 09:41:59 -07:00
David Anderson 78a9c920c7 - web: more fixes from Christian Beer. Fixes
svn path=/trunk/boinc/; revision=24050
2011-08-26 18:30:13 +00:00
David Anderson 43a3036101 - back end: allow the specification of a read-only DB replica
(in config.xml) to include DB name, user, and password.
- back end: add read-only replica info to SCHED_CONFIG,
    so that C++ programs can use the replica
    (currently only PHP code can use it)
- db_dump: use the read-only DB replica if it exists.


svn path=/trunk/boinc/; revision=22958
2011-01-28 22:03:46 +00:00
David Anderson e87f289544 - fix formatting in PHP code
svn path=/trunk/boinc/; revision=22623
2010-11-04 18:20:57 +00:00
David Anderson 4b5be47639 - web: replace the vaguely-named process_user_text()
with BoincDb::escape_string()
- web: have BoincDb::escape_string() also do a trim()

svn path=/trunk/boinc/; revision=16686
2008-12-14 22:18:49 +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 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 75e5e0a1ee - user web: fixes
svn path=/trunk/boinc/; revision=14165
2007-11-12 22:39:56 +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 94f9b46fc9 - user web: make buttons look better;
add a function show_button() to display links as buttons
    with hover-based explanation.
    This should be used whenever clicking on something
    performs an action, rather than just going to a new page
    (sometimes the boundary is fuzzy)
- user web: fixed bug when send private message by user name
    

svn path=/trunk/boinc/; revision=14015
2007-10-31 23:50:21 +00:00
David Anderson e1ca1c5aee - User web: more DB framework changes;
extended DB framework to allow use of a read-only replica

svn path=/trunk/boinc/; revision=13985
2007-10-29 16:38:25 +00:00
David Anderson ee4e3fba01 - user web: Add BoincDb::escape_string(),
and have boinc_real_escape_string 
    call it rather than mysql_real_escape_string(),
    to ensure that a DB connection exists
    (you need one to call mysql_real_escape_string()).
- some additional conversion to BoincDb-based classes

svn path=/trunk/boinc/; revision=13977
2007-10-27 20:38:12 +00:00
David Anderson 156aa07711 svn path=/trunk/boinc/; revision=13963 2007-10-25 21:36:05 +00:00
David Anderson 27a7659f36 - Bossa: changed the DB infrastructure to let Bossa tables
live in a different database (and/or server) than the BOINC tables.
    Also eliminated the need to call a DB init function.
    This involved:
    1) adding <bossa_db_host> etc. entries to config.xml
    2) prefixing DB name to table name in all Bossa queries
        (this is needed if Bossa DB is on same server as BOINC DB,
        since we're using persistent connections)
- user web: added Montenegro, and changed Serbia and Montenegro to Serbia
    (requires DB update to make latter change in existing records)


svn path=/trunk/boinc/; revision=13962
2007-10-25 21:34:13 +00:00
David Anderson 2d9df04429 - more team stuff
svn path=/trunk/boinc/; revision=13223
2007-07-26 21:50:45 +00:00
David Anderson 2af893b0f2 - user web: code cleanup related to team creation.
Make a single function that creates teams
    and cleanses arguments.
- API: don't include config.h in parse.h.
    This file is included from apps
    (indirectly, via graphics_api.h)
    so it shouldn't assume that config.h exists

svn path=/trunk/boinc/; revision=13212
2007-07-25 03:17:31 +00:00
Rytis Slatkevičius 79e77f1de5 Fix non-unique user name handling in private messages
svn path=/trunk/boinc/; revision=12657
2007-05-11 20:34:16 +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
Matt Lebofsky 9e0b73e9d3 *** empty log message ***
svn path=/trunk/boinc/; revision=12223
2007-03-14 18:05:30 +00:00
Rytis Slatkevičius 8f7c1467b8 Function to lookup all teams where the user is founder
svn path=/trunk/boinc/; revision=11398
2006-10-30 09:03:52 +00:00
David Anderson 2534035cae *** empty log message ***
svn path=/trunk/boinc/; revision=5527
2005-02-25 00:41:22 +00:00
David Anderson 7be3f2711b *** empty log message ***
svn path=/trunk/boinc/; revision=5500
2005-02-23 00:42:14 +00:00
David Anderson 1e808b012c *** empty log message ***
svn path=/trunk/boinc/; revision=5494
2005-02-22 19:37:55 +00:00
David Anderson d38bdf43ec *** empty log message ***
svn path=/trunk/boinc/; revision=5435
2005-02-15 22:29:32 +00:00
David Anderson 15e29841be *** empty log message ***
svn path=/trunk/boinc/; revision=4941
2004-12-27 03:42:11 +00:00
Lana Alber b5bc0a836d *** empty log message ***
svn path=/trunk/boinc/; revision=4220
2004-09-21 21:56:10 +00:00
Lana Alber a5836d59b5 *** empty log message ***
svn path=/trunk/boinc/; revision=4219
2004-09-21 20:35:36 +00:00
David Anderson a80dd102d0 *** empty log message ***
svn path=/trunk/boinc/; revision=4198
2004-09-14 20:45:17 +00:00
David Anderson 5edfed8bf4 *** empty log message ***
svn path=/trunk/boinc/; revision=4004
2004-08-06 12:12:26 +00:00
David Anderson cd3884593b *** empty log message ***
svn path=/trunk/boinc/; revision=3727
2004-06-30 18:53:35 +00:00
David Anderson 00191f0456 *** empty log message ***
svn path=/trunk/boinc/; revision=3308
2004-04-30 18:26:20 +00:00
David Anderson 02eb8c99a8 *** empty log message ***
svn path=/trunk/boinc/; revision=2948
2004-02-03 21:48:49 +00:00
Karl Chen 545a56d5c8 directory structure change
svn path=/trunk/boinc/; revision=2938
2004-02-02 23:34:39 +00:00