aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-14 22:12:56 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-14 22:12:56 -0700
commitf0cb3cba124e637fa46143b692dbb561d4ee3ae0 (patch)
tree4f68c7be82a55db67083c4618fa6dfa227994713 /mod
parenta6cb90c81c29663e96d4fd96acd43fde1c28ac15 (diff)
parent291f3beccfa6aede56cd2df811701fecbbdbbbc1 (diff)
downloadvolse-hubzilla-f0cb3cba124e637fa46143b692dbb561d4ee3ae0.tar.gz
volse-hubzilla-f0cb3cba124e637fa46143b692dbb561d4ee3ae0.tar.bz2
volse-hubzilla-f0cb3cba124e637fa46143b692dbb561d4ee3ae0.zip
Merge branch 'master' into tres
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/");