git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 24136352 authored by Mike Sheldon's avatar Mike Sheldon

Merge branch 'master' of git://gitorious.org/foocorp/gnu-fm

parents f5fd90c1 b763bbb1
......@@ -169,6 +169,8 @@ function method_user_getTopArtists() {
* * **user** (required) : Name of the user.
* * **limit** (optional) : How many items to show. Defaults to 50.
* * **page** (optional) : The page to show. Defaults to 1.
* * **from** (optional) : Show items newer than this timestamp (UNIX format)
* * **to** (optional) : Show items older than this timestamp (UNIX format)
* * **format** (optional) : Format of response, **xml** or **json**. Default is xml.
* - - -
*
......@@ -184,7 +186,7 @@ function method_user_getRecentTracks() {
$limit = get_with_default('limit', 50);
$page = get_with_default('page', 1);
$xml = UserXML::getRecentTracks($_REQUEST['user'], $limit, $page);
$xml = UserXML::getRecentTracks($_REQUEST['user'], $limit, $page, $_REQUEST['from'], $_REQUEST['to']);
respond($xml);
}
......@@ -973,7 +975,7 @@ function method_radio_tune() {
$stationurl = 'http://libre.fm';
if ($_REQUEST['format'] == 'json') {
header('Content-Type: text/javascript');
header('Content-Type: application/json; charset=utf-8');
$json_data = array('station' => array('type' => $stationtype, 'name' => $stationname, 'url' => $stationurl, 'supportsdiscovery' => 1));
print(json_encode($json_data));
} else {
......@@ -1057,7 +1059,7 @@ function method_radio_getPlaylist() {
'track' => $tracks)
);
header('Content-Type: text/javascript');
header('Content-Type: application/json; charset=utf-8');
print(json_encode($playlist));
}else{
//we return XSPF playlists by default
......@@ -1677,7 +1679,7 @@ function xml_response($xml) {
}
function json_response($data) {
header('Content-Type: text/javascript');
header('Content-Type: application/json; charset=utf-8');
if ($_REQUEST['callback']) {
print($_REQUEST['callback'] . '(' . $data . ');');
} else {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
/**
* An interface for OpenID extensions.
*
* @package OpenID
*/
/**
* Require the Message implementation.
*/
require_once 'Auth/OpenID/Message.php';
/**
* A base class for accessing extension request and response data for
* the OpenID 2 protocol.
*
* @package OpenID
*/
class Auth_OpenID_Extension {
/**
* ns_uri: The namespace to which to add the arguments for this
* extension
*/
var $ns_uri = null;
var $ns_alias = null;
/**
* Get the string arguments that should be added to an OpenID
* message for this extension.
*/
function getExtensionArgs()
{
return null;
}
/**
* Add the arguments from this extension to the provided message.
*
* Returns the message with the extension arguments added.
*/
function toMessage(&$message)
{
$implicit = $message->isOpenID1();
$added = $message->namespaces->addAlias($this->ns_uri,
$this->ns_alias,
$implicit);
if ($added === null) {
if ($message->namespaces->getAlias($this->ns_uri) !=
$this->ns_alias) {
return null;
}
}
$message->updateArgs($this->ns_uri,
$this->getExtensionArgs());
return $message;
}
}
?>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<p><a href="/">{t}Back to site{/t}</a> | <a href="{$base_url}/register.php">{t}Register{/t}</a> | <a href="{$base_url}/login.php">{t}Login{/t}</a> | <a href="{$base_url}/reset.php">{t}Lost password{/t}</a></p>
<p><a href="/">{t}Back to site{/t}</a> | {if !($registration_disabled)}<a href="{$base_url}/register.php">{t}Register{/t}</a> |{/if} <a href="{$base_url}/login.php">{t}Login{/t}</a> | <a href="{$base_url}/reset.php">{t}Lost password{/t}</a></p>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment