diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Api.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Settings.php | 6 | ||||
-rw-r--r-- | Zotlabs/Web/SessionHandler.php | 6 | ||||
-rw-r--r-- | Zotlabs/Zot/Verify.php | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/Zotlabs/Module/Api.php b/Zotlabs/Module/Api.php index 3e7f23b6c..e4744c29f 100644 --- a/Zotlabs/Module/Api.php +++ b/Zotlabs/Module/Api.php @@ -107,7 +107,7 @@ class Api extends \Zotlabs\Web\Controller { $r = q("SELECT `clients`.* FROM `clients`, `tokens` WHERE `clients`.`client_id`=`tokens`.`client_id` - AND `tokens`.`id`='%s' AND `tokens`.`scope`='request'", + AND `tokens`.`id`='%s' AND `tokens`.`auth_scope`='request'", dbesc($token)); if (!count($r)) diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php index 5687ce84b..43162a2b0 100644 --- a/Zotlabs/Module/Settings.php +++ b/Zotlabs/Module/Settings.php @@ -78,7 +78,7 @@ class Settings extends \Zotlabs\Web\Controller { $r = q("UPDATE clients SET client_id='%s', pw='%s', - name='%s', + clname='%s', redirect_uri='%s', icon='%s', uid=%d @@ -91,7 +91,7 @@ class Settings extends \Zotlabs\Web\Controller { intval(local_channel()), dbesc($key)); } else { - $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), @@ -615,7 +615,7 @@ class Settings extends \Zotlabs\Web\Controller { '$title' => t('Add application'), '$submit' => t('Update'), '$cancel' => t('Cancel'), - '$name' => array('name', t('Name'), $app['name'] , ''), + '$name' => array('name', t('Name'), $app['clname'] , ''), '$key' => array('key', t('Consumer Key'), $app['client_id'], ''), '$secret' => array('secret', t('Consumer Secret'), $app['pw'], ''), '$redirect' => array('redirect', t('Redirect'), $app['redirect_uri'], ''), diff --git a/Zotlabs/Web/SessionHandler.php b/Zotlabs/Web/SessionHandler.php index 6980a6408..6e7333b4b 100644 --- a/Zotlabs/Web/SessionHandler.php +++ b/Zotlabs/Web/SessionHandler.php @@ -18,10 +18,10 @@ class SessionHandler implements \SessionHandlerInterface { function read ($id) { if($id) { - $r = q("SELECT `data` FROM `session` WHERE `sid`= '%s'", dbesc($id)); + $r = q("SELECT `sess_data` FROM `session` WHERE `sid`= '%s'", dbesc($id)); if($r) { - return $r[0]['data']; + return $r[0]['sess_data']; } else { q("INSERT INTO `session` (sid, expire) values ('%s', '%s')", @@ -59,7 +59,7 @@ class SessionHandler implements \SessionHandlerInterface { } q("UPDATE `session` - SET `data` = '%s', `expire` = '%s' WHERE `sid` = '%s'", + SET `sess_data` = '%s', `expire` = '%s' WHERE `sid` = '%s'", dbesc($data), dbesc($expire), dbesc($id) diff --git a/Zotlabs/Zot/Verify.php b/Zotlabs/Zot/Verify.php index 1192202db..06bd3188c 100644 --- a/Zotlabs/Zot/Verify.php +++ b/Zotlabs/Zot/Verify.php @@ -6,7 +6,7 @@ namespace Zotlabs\Zot; class Verify { function create($type,$channel_id,$token,$meta) { - return q("insert into verify ( type, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )", + return q("insert into verify ( vtype, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )", dbesc($type), intval($channel_id), dbesc($token), @@ -16,7 +16,7 @@ class Verify { } function match($type,$channel_id,$token,$meta) { - $r = q("select id from verify where type = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1", + $r = q("select id from verify where vtype = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1", dbesc($type), intval($channel_id), dbesc($token), @@ -32,7 +32,7 @@ class Verify { } function purge($type,$interval) { - q("delete from verify where type = '%s' and created < %s - INTERVAL %s", + q("delete from verify where vtype = '%s' and created < %s - INTERVAL %s", dbesc($type), db_utcnow(), db_quoteinterval($interval) |