aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-14 22:12:37 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-14 22:12:37 -0700
commit291f3beccfa6aede56cd2df811701fecbbdbbbc1 (patch)
tree075e84f5392303d4443a5fc45f6b16be673cc24c /mod
parent9de88c49c35d6bfb92080e6a048fc34eb20f6f90 (diff)
parentbceef58584a5753482412e7029f59710afe94a20 (diff)
downloadvolse-hubzilla-291f3beccfa6aede56cd2df811701fecbbdbbbc1.tar.gz
volse-hubzilla-291f3beccfa6aede56cd2df811701fecbbdbbbc1.tar.bz2
volse-hubzilla-291f3beccfa6aede56cd2df811701fecbbdbbbc1.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Diffstat (limited to 'mod')
-rw-r--r--mod/settings.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 56949f9d4..0cb7992ed 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -95,18 +95,23 @@ function settings_post(&$a) {
dbesc($name),
dbesc($redirect),
dbesc($icon),
- local_channel(),
+ intval(local_channel()),
dbesc($key));
} else {
- $r = q("INSERT INTO clients
- (client_id, pw, name, redirect_uri, icon, uid)
- VALUES ('%s','%s','%s','%s','%s',%d)",
- dbesc($key),
- dbesc($secret),
- dbesc($name),
- dbesc($redirect),
- dbesc($icon),
- local_channel());
+ $r = q("INSERT INTO clients (client_id, pw, name, redirect_uri, icon, uid)
+ VALUES ('%s','%s','%s','%s','%s',%d)",
+ dbesc($key),
+ dbesc($secret),
+ dbesc($name),
+ dbesc($redirect),
+ dbesc($icon),
+ intval(local_channel())
+ );
+ $r = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
+ dbesc($key),
+ intval(local_channel()),
+ dbesc('all')
+ );
}
}
goaway($a->get_baseurl(true)."/settings/oauth/");