Commit Graph

7 Commits

Author SHA1 Message Date
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
David Anderson c6c066bde1 - Bossa: refactor DB code, creating a new PHP class DbConn
representing a connection to a database.
    This is independent of Bossa,
    and we should rewrite the BOINC PHP code based on this.

svn path=/trunk/boinc/; revision=13967
2007-10-26 17:04:46 +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 1239291e44 - client: add <active_task_state> to <active_task> elements in state file.
These are needed by some 3rd-party software that uses
    the state file instead of GUI RPCs


svn path=/trunk/boinc/; revision=13921
2007-10-21 20:54:24 +00:00
David Anderson 094eb0095e - Bossa:
JSON-encode stuff
    use text instead of varchar(255) a couple of places
    create Bossa class for utility functions

svn path=/trunk/boinc/; revision=13908
2007-10-18 21:43:25 +00:00
David Anderson b079d40cb9 - API, Unix: call getrusage() from the timer thread,
not the worker signal handler.
    There's no reason to call it from the signal handler -
    it returns the CPU for the entire process, not the calling thread.
    And it may be asynch-signal-handler-unsafe.
- API: comment out checks for bad CPU times.
    I don't think this is needed now, and in some cases it's wrong
    (multi-threaded apps can accumulate CPU faster than real time)
- API, Unix: in boinc_calling_thread_cpu_time(), don't retry getrusage().
- Bossa: switch to better class structure (suggested by Nicolas Alvarez).
    Haven't switched to mysqli yet, but will later.
    Also various other Bossa fixes

svn path=/trunk/boinc/; revision=13855
2007-10-16 23:02:13 +00:00
David Anderson ad2fe67886 - Initial checkin of Bossa code.
This isn't part of BOINC and eventually
    it should go in a different repository,
    but for now I'm putting it here.

svn path=/trunk/boinc/; revision=13851
2007-10-16 17:12:48 +00:00