From 179eeb10a6e1b661dc7788d74d60a7c11dfca6bf Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Tue, 15 May 2018 19:57:40 -0400 Subject: Rename Permission Groups to Permission Categories and clarify feature settings text. --- Zotlabs/Widget/Settings_menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Widget/Settings_menu.php b/Zotlabs/Widget/Settings_menu.php index 9574becc3..f35d6f147 100644 --- a/Zotlabs/Widget/Settings_menu.php +++ b/Zotlabs/Widget/Settings_menu.php @@ -105,7 +105,7 @@ class Settings_menu { if(feature_enabled(local_channel(),'permcats')) { $tabs[] = array( - 'label' => t('Permission Groups'), + 'label' => t('Permission Categories'), 'url' => z_root() . '/settings/permcats', 'selected' => ((argv(1) === 'permcats') ? 'active' : ''), ); -- cgit v1.2.3 From 7f7e049397fcd7526ca75dd91bd881369219f019 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 18 May 2018 21:30:07 +0200 Subject: an attempt to fix the new_channel validation situation --- Zotlabs/Module/New_channel.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php index df7da2fe8..c946961bc 100644 --- a/Zotlabs/Module/New_channel.php +++ b/Zotlabs/Module/New_channel.php @@ -137,16 +137,19 @@ class New_channel extends \Zotlabs\Web\Controller { } } - $name_help = (($default_role) + $name_help = ''; + $name_help .= (($default_role) ? t('Your real name is recommended.') : t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"') - ); - - $nick_help = t('This will be used to create a unique network address (like an email address).'); + ); + $name_help .= ''; + $nick_help = ''; + $nick_help .= t('This will be used to create a unique network address (like an email address).'); if(! get_config('system','unicode_usernames')) { $nick_help .= ' ' . t('Allowed characters are a-z 0-9, - and _'); } + $nick_help .= ''; $privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "" ); -- cgit v1.2.3 From 7e99931733c75ded40c5c6bdd12a42213ccb7a2e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 20 May 2018 09:23:44 +0200 Subject: implement jot reset button --- Zotlabs/Module/Network.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 2d6307eb1..82c88e565 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -185,7 +185,8 @@ class Network extends \Zotlabs\Web\Controller { 'editor_autocomplete' => true, 'bbco_autocomplete' => 'bbcode', 'bbcode' => true, - 'jotnets' => true + 'jotnets' => true, + 'reset' => t('Reset form') ); if($deftag) $x['pretext'] = $deftag; -- cgit v1.2.3 From 4eb40528a9d615b9498c64b4a308596ba632119a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 20 May 2018 14:07:30 +0200 Subject: local_channel() is not string --- Zotlabs/Module/Settings/Oauth2.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Settings/Oauth2.php b/Zotlabs/Module/Settings/Oauth2.php index 88bbea3b8..66eb95f81 100644 --- a/Zotlabs/Module/Settings/Oauth2.php +++ b/Zotlabs/Module/Settings/Oauth2.php @@ -132,10 +132,10 @@ class Oauth2 { } - $r = q("SELECT oauth_clients.*, oauth_access_tokens.access_token as oauth_token, (oauth_clients.user_id = '%s') AS my + $r = q("SELECT oauth_clients.*, oauth_access_tokens.access_token as oauth_token, (oauth_clients.user_id = %d) AS my FROM oauth_clients LEFT JOIN oauth_access_tokens ON oauth_clients.client_id=oauth_access_tokens.client_id - WHERE oauth_clients.user_id IN ('%s',0)", + WHERE oauth_clients.user_id IN (%d,0)", dbesc(local_channel()), dbesc(local_channel()) ); @@ -157,4 +157,4 @@ class Oauth2 { } -} \ No newline at end of file +} -- cgit v1.2.3 From 9e1af2492ff30f65e678ca1b885350069583ade0 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 20 May 2018 14:15:46 +0200 Subject: more local_channel() is not string --- Zotlabs/Module/Settings/Oauth2.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Settings/Oauth2.php b/Zotlabs/Module/Settings/Oauth2.php index 66eb95f81..8db5c14aa 100644 --- a/Zotlabs/Module/Settings/Oauth2.php +++ b/Zotlabs/Module/Settings/Oauth2.php @@ -43,24 +43,24 @@ class Oauth2 { redirect_uri = '%s', grant_types = '%s', scope = '%s', - user_id = '%s' + user_id = %d WHERE client_id='%s'", dbesc($name), dbesc($secret), dbesc($redirect), dbesc($grant), dbesc($scope), - dbesc(local_channel()), + intval(local_channel()), dbesc($name)); } else { $r = q("INSERT INTO oauth_clients (client_id, client_secret, redirect_uri, grant_types, scope, user_id) - VALUES ('%s','%s','%s','%s','%s','%s')", + VALUES ('%s','%s','%s','%s','%s',%d)", dbesc($name), dbesc($secret), dbesc($redirect), dbesc($grant), dbesc($scope), - dbesc(local_channel()) + intval(local_channel()) ); $r = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ", dbesc($name), @@ -93,9 +93,9 @@ class Oauth2 { } if((argc() > 3) && (argv(2) === 'edit')) { - $r = q("SELECT * FROM oauth_clients WHERE client_id='%s' AND user_id= '%s'", + $r = q("SELECT * FROM oauth_clients WHERE client_id='%s' AND user_id= %d", dbesc(argv(3)), - dbesc(local_channel()) + intval(local_channel()) ); if (! $r){ @@ -123,9 +123,9 @@ class Oauth2 { if((argc() > 3) && (argv(2) === 'delete')) { check_form_security_token_redirectOnErr('/settings/oauth2', 'settings_oauth2', 't'); - $r = q("DELETE FROM oauth_clients WHERE client_id = '%s' AND user_id = '%s'", + $r = q("DELETE FROM oauth_clients WHERE client_id = '%s' AND user_id = %d", dbesc(argv(3)), - dbesc(local_channel()) + intval(local_channel()) ); goaway(z_root()."/settings/oauth2/"); return; @@ -136,8 +136,8 @@ class Oauth2 { FROM oauth_clients LEFT JOIN oauth_access_tokens ON oauth_clients.client_id=oauth_access_tokens.client_id WHERE oauth_clients.user_id IN (%d,0)", - dbesc(local_channel()), - dbesc(local_channel()) + intval(local_channel()), + intval(local_channel()) ); $tpl = get_markup_template("settings_oauth2.tpl"); -- cgit v1.2.3 From 55e1026c986f1c2c7e2a0376579b01111a93ab5d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 20 May 2018 20:48:52 +0200 Subject: improve abconfig queries --- Zotlabs/Update/_1213.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Zotlabs/Update/_1213.php (limited to 'Zotlabs') diff --git a/Zotlabs/Update/_1213.php b/Zotlabs/Update/_1213.php new file mode 100644 index 000000000..d396829a6 --- /dev/null +++ b/Zotlabs/Update/_1213.php @@ -0,0 +1,28 @@ + Date: Sun, 20 May 2018 22:42:47 +0200 Subject: update oauth related tables to use bigint/int(10) for user_id column. this is to be more consistent with the rest of the tables and fixes issue #1180 --- Zotlabs/Module/Settings/Oauth2.php | 3 +- Zotlabs/Update/_1214.php | 57 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 Zotlabs/Update/_1214.php (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Settings/Oauth2.php b/Zotlabs/Module/Settings/Oauth2.php index 8db5c14aa..985095115 100644 --- a/Zotlabs/Module/Settings/Oauth2.php +++ b/Zotlabs/Module/Settings/Oauth2.php @@ -14,7 +14,8 @@ class Oauth2 { $key = $_POST['remove']; q("DELETE FROM tokens WHERE id='%s' AND uid=%d", dbesc($key), - local_channel()); + intval(local_channel()) + ); goaway(z_root()."/settings/oauth2/"); return; } diff --git a/Zotlabs/Update/_1214.php b/Zotlabs/Update/_1214.php new file mode 100644 index 000000000..06e5d96ed --- /dev/null +++ b/Zotlabs/Update/_1214.php @@ -0,0 +1,57 @@ +