mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Merge branch 'develop' of https://github.com/nioc/ampache into nioc-develop
This commit is contained in:
commit
24918b6cd0
7 changed files with 413 additions and 374 deletions
|
@ -380,6 +380,16 @@ function create_preference_input($name,$value)
|
|||
echo "\t<option value=\"name_desc\" $is_sort_name_desc>" . T_('Name descending') . "</option>\n";
|
||||
echo "</select>\n";
|
||||
break;
|
||||
case 'lastfm_grant_link':
|
||||
case 'librefm_grant_link':
|
||||
// construct links for granting access Ampache application to Last.fm and Libre.fm
|
||||
$plugin_name = ucfirst(str_replace('_grant_link', '', $name));
|
||||
$plugin = new Plugin($plugin_name);
|
||||
$url = $plugin->_plugin->url;
|
||||
$api_key = rawurlencode(AmpConfig::get('lastfm_api_key'));
|
||||
$callback = rawurlencode(AmpConfig::get('web_path').'/preferences.php?tab=plugins&action=grant&plugin='.$plugin_name);
|
||||
echo "<a href='$url/api/auth/?api_key=$api_key&cb=$callback'>" . UI::get_icon('plugin', T_("Click for grant Ampache to ").$plugin_name).'</a>';
|
||||
break;
|
||||
default:
|
||||
if (preg_match('/_pass$/', $name)) {
|
||||
echo '<input type="password" name="' . $name . '" value="******" />';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue