aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/settings.php19
-rw-r--r--version.inc2
2 files changed, 14 insertions, 7 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 9c60c0ec2..cc8fd2564 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -154,10 +154,17 @@ function settings_post(&$a) {
$secret = ((x($_POST,'secret')) ? $_POST['secret'] : '');
$redirect = ((x($_POST,'redirect')) ? $_POST['redirect'] : '');
$icon = ((x($_POST,'icon')) ? $_POST['icon'] : '');
- if ($name=="" || $key=="" || $secret==""){
- notice(t("Missing some important data!"));
-
- } else {
+ $ok = true;
+ if($name == '') {
+ $ok = false;
+ notice( t('Name is required') . EOL);
+ }
+ if($key == '' || $secret == '') {
+ $ok = false;
+ notice( t('Key and Secret are required') . EOL);
+ }
+
+ if($ok) {
if ($_POST['submit']==t("Update")){
$r = q("UPDATE clients SET
client_id='%s',
@@ -628,8 +635,8 @@ function settings_content(&$a) {
'$submit' => t('Submit'),
'$cancel' => t('Cancel'),
'$name' => array('name', t('Name'), '', t('Name of application')),
- '$key' => array('key', t('Consumer Key'), random_string(16), t('Automatically generated - change if desired')),
- '$secret' => array('secret', t('Consumer Secret'), random_string(16), t('Automatically generated - change if desired')),
+ '$key' => array('key', t('Consumer Key'), random_string(16), t('Automatically generated - change if desired. Max length 20')),
+ '$secret' => array('secret', t('Consumer Secret'), random_string(16), t('Automatically generated - change if desired. Max length 20')),
'$redirect' => array('redirect', t('Redirect'), '', t('Redirect URI - leave blank unless your application specifically requires this')),
'$icon' => array('icon', t('Icon url'), '', t('Optional')),
));
diff --git a/version.inc b/version.inc
index cc6bda10c..451a8e715 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-09-22.444
+2013-09-23.445