From 6370953286e7db7f682b6391213cd5d21fdaeaf3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 22 Mar 2015 09:26:18 +0100 Subject: [PATCH] The settings for the application name are removed since they will be filled automatically. --- statusnet/statusnet.php | 16 ++++++++-------- statusnet/templates/admin.tpl | 2 +- twitter/templates/admin.tpl | 2 +- twitter/twitter.php | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index a4b539f4d..f0099d94d 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -191,7 +191,7 @@ function statusnet_settings_post ($a,$post) { set_pconfig(local_user(), 'statusnet', 'consumerkey', $asn['consumerkey'] ); set_pconfig(local_user(), 'statusnet', 'consumersecret', $asn['consumersecret'] ); set_pconfig(local_user(), 'statusnet', 'baseapi', $asn['apiurl'] ); - set_pconfig(local_user(), 'statusnet', 'application_name', $asn['applicationname'] ); + //set_pconfig(local_user(), 'statusnet', 'application_name', $asn['applicationname'] ); } else { notice( t('Please contact your site administrator.
The provided API URL is not valid.').EOL.$asn['apiurl'].EOL ); } @@ -210,7 +210,7 @@ function statusnet_settings_post ($a,$post) { set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']); set_pconfig(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']); set_pconfig(local_user(), 'statusnet', 'baseapi', $apibase ); - set_pconfig(local_user(), 'statusnet', 'application_name', $_POST['statusnet-applicationname'] ); + //set_pconfig(local_user(), 'statusnet', 'application_name', $_POST['statusnet-applicationname'] ); } else { // the API path is not correct, maybe missing trailing / ? $apibase = $apibase . '/'; @@ -328,8 +328,8 @@ function statusnet_settings(&$a,&$s) { $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; - $s .= '
'; + //$s .= ''; + //$s .= '
'; $s .= '

'; $s .= '
'; $s .= ''; @@ -637,7 +637,7 @@ function statusnet_plugin_admin_post(&$a){ $apiurl=$apiurl.'/'; $secret=trim($_POST['secret'][$id]); $key=trim($_POST['key'][$id]); - $applicationname = ((x($_POST, 'applicationname')) ? notags(trim($_POST['applicationname'][$id])):''); + //$applicationname = ((x($_POST, 'applicationname')) ? notags(trim($_POST['applicationname'][$id])):''); if ($sitename!="" && $apiurl!="" && $secret!="" && @@ -649,7 +649,7 @@ function statusnet_plugin_admin_post(&$a){ 'apiurl' => $apiurl, 'consumersecret' => $secret, 'consumerkey' => $key, - 'applicationname' => $applicationname + //'applicationname' => $applicationname ); } } @@ -669,7 +669,7 @@ function statusnet_plugin_admin(&$a, &$o){ 'apiurl' => Array("apiurl[$id]", "Api url", $s['apiurl'], t("Base API Path \x28remember the trailing /\x29") ), 'secret' => Array("secret[$id]", "Secret", $s['consumersecret'], ""), 'key' => Array("key[$id]", "Key", $s['consumerkey'], ""), - 'applicationname' => Array("applicationname[$id]", "Application name", $s['applicationname'], ""), + //'applicationname' => Array("applicationname[$id]", "Application name", $s['applicationname'], ""), 'delete' => Array("delete[$id]", "Delete", False , "Check to delete this preset"), ); } @@ -681,7 +681,7 @@ function statusnet_plugin_admin(&$a, &$o){ 'apiurl' => Array("apiurl[$id]", "Api url", "", t("Base API Path \x28remember the trailing /\x29") ), 'secret' => Array("secret[$id]", t("Consumer Secret"), "", ""), 'key' => Array("key[$id]", t("Consumer Key"), "", ""), - 'applicationname' => Array("applicationname[$id]", t("Application name"), "", ""), + //'applicationname' => Array("applicationname[$id]", t("Application name"), "", ""), ); $t = get_markup_template( "admin.tpl", "addon/statusnet/" ); diff --git a/statusnet/templates/admin.tpl b/statusnet/templates/admin.tpl index f8d14c696..1d884b35b 100644 --- a/statusnet/templates/admin.tpl +++ b/statusnet/templates/admin.tpl @@ -3,7 +3,7 @@ {{include file="field_input.tpl" field=$s.apiurl}} {{include file="field_input.tpl" field=$s.secret}} {{include file="field_input.tpl" field=$s.key}} - {{include file="field_input.tpl" field=$s.applicationname}} + {{if $s.delete}} {{include file="field_checkbox.tpl" field=$s.delete}}
diff --git a/twitter/templates/admin.tpl b/twitter/templates/admin.tpl index 554ed5a0f..d598e8884 100644 --- a/twitter/templates/admin.tpl +++ b/twitter/templates/admin.tpl @@ -1,4 +1,4 @@ {{include file="field_input.tpl" field=$consumerkey}} {{include file="field_input.tpl" field=$consumersecret}} -{{include file="field_input.tpl" field=$applicationname}} +
diff --git a/twitter/twitter.php b/twitter/twitter.php index 16b3ea461..8d7e21fbb 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -572,7 +572,7 @@ function twitter_plugin_admin_post(&$a){ $applicationname = ((x($_POST, 'applicationname')) ? notags(trim($_POST['applicationname'])):''); set_config('twitter','consumerkey',$consumerkey); set_config('twitter','consumersecret',$consumersecret); - set_config('twitter','application_name',$applicationname); + //set_config('twitter','application_name',$applicationname); info( t('Settings updated.'). EOL ); } function twitter_plugin_admin(&$a, &$o){ @@ -583,7 +583,7 @@ function twitter_plugin_admin(&$a, &$o){ // name, label, value, help, [extra values] '$consumerkey' => array('consumerkey', t('Consumer key'), get_config('twitter', 'consumerkey' ), ''), '$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), ''), - '$applicationname' => array('applicationname', t('Name of the Twitter Application'), get_config('twitter','application_name'),t('Set this to the exact name you gave the app on twitter.com/apps to avoid mirroring postings from ~friendica back to ~friendica')) + //'$applicationname' => array('applicationname', t('Name of the Twitter Application'), get_config('twitter','application_name'),t('Set this to the exact name you gave the app on twitter.com/apps to avoid mirroring postings from ~friendica back to ~friendica')) )); }