The legacy OAuth server is removed
This commit is contained in:
parent
110f8018eb
commit
6668066099
16 changed files with 347 additions and 1314 deletions
13
update.php
13
update.php
|
@ -240,9 +240,12 @@ function pre_update_1348()
|
|||
|
||||
update_1348();
|
||||
|
||||
DBA::e("DELETE FROM `auth_codes` WHERE NOT `client_id` IN (SELECT `client_id` FROM `clients`)");
|
||||
DBA::e("DELETE FROM `tokens` WHERE NOT `client_id` IN (SELECT `client_id` FROM `clients`)");
|
||||
|
||||
if (DBStructure::existsTable('auth_codes') && DBStructure::existsTable('clients')) {
|
||||
DBA::e("DELETE FROM `auth_codes` WHERE NOT `client_id` IN (SELECT `client_id` FROM `clients`)");
|
||||
}
|
||||
if (DBStructure::existsTable('tokens') && DBStructure::existsTable('clients')) {
|
||||
DBA::e("DELETE FROM `tokens` WHERE NOT `client_id` IN (SELECT `client_id` FROM `clients`)");
|
||||
}
|
||||
return Update::SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -391,7 +394,7 @@ function pre_update_1364()
|
|||
return Update::FAILED;
|
||||
}
|
||||
|
||||
if (!DBA::e("DELETE FROM `clients` WHERE NOT `uid` IN (SELECT `uid` FROM `user`)")) {
|
||||
if (DBStructure::existsTable('clients') && !DBA::e("DELETE FROM `clients` WHERE NOT `uid` IN (SELECT `uid` FROM `user`)")) {
|
||||
return Update::FAILED;
|
||||
}
|
||||
|
||||
|
@ -463,7 +466,7 @@ function pre_update_1364()
|
|||
return Update::FAILED;
|
||||
}
|
||||
|
||||
if (!DBA::e("DELETE FROM `tokens` WHERE NOT `uid` IN (SELECT `uid` FROM `user`)")) {
|
||||
if (DBStructure::existsTable('tokens') && !DBA::e("DELETE FROM `tokens` WHERE NOT `uid` IN (SELECT `uid` FROM `user`)")) {
|
||||
return Update::FAILED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue