mirror of https://github.com/BOINC/boinc.git
Merge pull request #2423 from drshawnkwang/drupal_fix-bug-readonlydb
Drupal: Changed db_set_active to use proper database name.
This commit is contained in:
commit
756b04b836
|
@ -123,7 +123,7 @@ function boincteam_import($boincteam, $nid = NULL) {
|
|||
*/
|
||||
function _boincteam_userids($boincteamid, $boincid=TRUE) {
|
||||
$sql = 'SELECT user.id as id FROM {user} user WHERE user.teamid=%s';
|
||||
db_set_active('boinc');
|
||||
db_set_active('boinc_ro');
|
||||
$dbres = db_query($sql, $boincteamid);
|
||||
db_set_active('default');
|
||||
$ids = array();
|
||||
|
|
|
@ -468,7 +468,7 @@ function boincuser_user_delete($account) {
|
|||
// Keep entry in drupal boincuser table as record of deletion.
|
||||
|
||||
// Delete data in BOINC project user table.
|
||||
db_set_active('boinc');
|
||||
db_set_active('boinc_rw');
|
||||
$qrc3 = db_query("UPDATE {user} SET user.create_time=NULL, user.email_addr=NULL, user.name=NULL, user.authenticator=NULL, user.teamid=NULL, user.cross_project_id=NULL, user.passwd_hash=NULL, user.signature=NULL WHERE user.id=%d", $boincid);
|
||||
db_set_active('default');
|
||||
}
|
||||
|
|
|
@ -442,8 +442,7 @@ function boincuser_views_friends_block_header($context = null) {
|
|||
*/
|
||||
function _boincuser_user_name_autocomplete($string) {
|
||||
$matches = array();
|
||||
// @todo - use boinc_rw if/when read-only PR is merged
|
||||
db_set_active('boinc');
|
||||
db_set_active('boinc_ro');
|
||||
$result = db_query_range("SELECT id,name FROM {user} WHERE name LIKE '%s%'", $string, 0, 10);
|
||||
db_set_active('default');
|
||||
while ($user = db_fetch_object($result)) {
|
||||
|
|
Loading…
Reference in New Issue