more removal of reserved words from DB schemas
This commit is contained in:
@@ -229,7 +229,7 @@ function verify_email_address($arr) {
|
||||
|
||||
$hash = random_string();
|
||||
|
||||
$r = q("INSERT INTO register ( hash, created, uid, password, language ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ",
|
||||
$r = q("INSERT INTO register ( hash, created, uid, password, lang ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ",
|
||||
dbesc($hash),
|
||||
dbesc(datetime_convert()),
|
||||
intval($arr['account']['account_id']),
|
||||
@@ -283,7 +283,7 @@ function send_reg_approval_email($arr) {
|
||||
|
||||
$hash = random_string();
|
||||
|
||||
$r = q("INSERT INTO register ( hash, created, uid, password, language ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ",
|
||||
$r = q("INSERT INTO register ( hash, created, uid, password, lang ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ",
|
||||
dbesc($hash),
|
||||
dbesc(datetime_convert()),
|
||||
intval($arr['account']['account_id']),
|
||||
@@ -387,7 +387,7 @@ function account_allow($hash) {
|
||||
intval($register[0]['uid'])
|
||||
);
|
||||
|
||||
push_lang($register[0]['language']);
|
||||
push_lang($register[0]['lang']);
|
||||
|
||||
$email_tpl = get_intltext_template("register_open_eml.tpl");
|
||||
$email_tpl = replace_macros($email_tpl, array(
|
||||
|
||||
@@ -368,7 +368,7 @@ require_once('include/api_auth.php');
|
||||
else
|
||||
$redirect = trim($_REQUEST['redirect_uris']);
|
||||
$icon = trim($_REQUEST['logo_uri']);
|
||||
$r = q("INSERT INTO clients (client_id, pw, name, redirect_uri, icon, uid)
|
||||
$r = q("INSERT INTO clients (client_id, pw, clname, redirect_uri, icon, uid)
|
||||
VALUES ('%s','%s','%s','%s','%s',%d)",
|
||||
dbesc($key),
|
||||
dbesc($secret),
|
||||
|
||||
@@ -37,7 +37,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore {
|
||||
|
||||
logger(__function__.":".$consumer.", ". $token_type.", ".$token, LOGGER_DEBUG);
|
||||
|
||||
$r = q("SELECT id, secret, scope, expires, uid FROM tokens WHERE client_id = '%s' AND scope = '%s' AND id = '%s'",
|
||||
$r = q("SELECT id, secret, auth_scope, expires, uid FROM tokens WHERE client_id = '%s' AND auth_scope = '%s' AND id = '%s'",
|
||||
dbesc($consumer->key),
|
||||
dbesc($token_type),
|
||||
dbesc($token)
|
||||
@@ -45,7 +45,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore {
|
||||
|
||||
if (count($r)){
|
||||
$ot=new OAuth1Token($r[0]['id'],$r[0]['secret']);
|
||||
$ot->scope=$r[0]['scope'];
|
||||
$ot->scope=$r[0]['auth_scope'];
|
||||
$ot->expires = $r[0]['expires'];
|
||||
$ot->uid = $r[0]['uid'];
|
||||
return $ot;
|
||||
@@ -79,7 +79,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore {
|
||||
$k = $consumer;
|
||||
}
|
||||
|
||||
$r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', %d)",
|
||||
$r = q("INSERT INTO tokens (id, secret, client_id, auth_scope, expires) VALUES ('%s','%s','%s','%s', %d)",
|
||||
dbesc($key),
|
||||
dbesc($sec),
|
||||
dbesc($k),
|
||||
@@ -110,7 +110,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore {
|
||||
$key = $this->gen_token();
|
||||
$sec = $this->gen_token();
|
||||
|
||||
$r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', %d, %d)",
|
||||
$r = q("INSERT INTO tokens (id, secret, client_id, auth_scope, expires, uid) VALUES ('%s','%s','%s','%s', %d, %d)",
|
||||
dbesc($key),
|
||||
dbesc($sec),
|
||||
dbesc($consumer->key),
|
||||
@@ -249,7 +249,7 @@ class FKOAuth2 extends OAuth2 {
|
||||
|
||||
|
||||
protected function getAuthCode($code) {
|
||||
$r = q("SELECT id, client_id, redirect_uri, expires, scope FROM auth_codes WHERE id = '%s'",
|
||||
$r = q("SELECT id, client_id, redirect_uri, expires, auth_scope FROM auth_codes WHERE id = '%s'",
|
||||
dbesc($code));
|
||||
|
||||
if (count($r))
|
||||
@@ -259,7 +259,7 @@ class FKOAuth2 extends OAuth2 {
|
||||
|
||||
protected function setAuthCode($code, $client_id, $redirect_uri, $expires, $scope = NULL) {
|
||||
$r = q("INSERT INTO auth_codes
|
||||
(id, client_id, redirect_uri, expires, scope) VALUES
|
||||
(id, client_id, redirect_uri, expires, auth_scope) VALUES
|
||||
('%s', '%s', '%s', %d, '%s')",
|
||||
dbesc($code),
|
||||
dbesc($client_id),
|
||||
|
||||
Reference in New Issue
Block a user