[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1554] whitespace
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1554] whitespace |
Date: |
Thu, 14 May 2009 04:01:39 +0000 |
Revision: 1554
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1554
Author: clint
Date: 2009-05-14 04:01:39 +0000 (Thu, 14 May 2009)
Log Message:
-----------
whitespace
Modified Paths:
--------------
trunk/gnukebox/fix-album-art.php
trunk/gnukebox/install.php
trunk/gnukebox/scrobble-utils.php
trunk/gnukebox/utils/human-time.php
trunk/gnukebox/version.php
trunk/nixtape/api/ArtistXML.php
trunk/nixtape/database2.php
trunk/nixtape/group.php
trunk/nixtape/install.php
trunk/nixtape/location.php
trunk/nixtape/rdf.php
trunk/nixtape/reset.php
trunk/nixtape/templating.php
trunk/nixtape/user-edit.php
trunk/nixtape/user-groups.php
trunk/nixtape/user-journal.php
trunk/nixtape/user-profile.php
trunk/nixtape/user-recent-tracks.php
trunk/nixtape/user-stats.php
trunk/nixtape/utils/arc/extractors/ARC2_DcExtractor.php
trunk/nixtape/utils/arc/extractors/ARC2_ErdfExtractor.php
trunk/nixtape/utils/arc/extractors/ARC2_OpenidExtractor.php
trunk/nixtape/utils/arc/extractors/ARC2_TwitterProfilePicExtractor.php
trunk/nixtape/utils/arc/store/ARC2_StoreDescribeQueryHandler.php
trunk/nixtape/utils/arc/store/ARC2_StoreRSSLoader.php
trunk/nixtape/utils/arc/store/ARC2_StoreSemHTMLLoader.php
trunk/nixtape/utils/arc/store/ARC2_StoreTurtleLoader.php
trunk/nixtape/utils/human-time.php
trunk/nixtape/utils/linkeddata.php
trunk/nixtape/utils/location-ws.php
trunk/nixtape/utils/random_code_generator.php
trunk/nixtape/utils/resolve-external.php
trunk/nixtape/utils/webid-finder-ws/form.php
trunk/nixtape/utils/webid-finder-ws/guts.php
trunk/nixtape/version.php
trunk/tests/index.php
Modified: trunk/gnukebox/fix-album-art.php
===================================================================
--- trunk/gnukebox/fix-album-art.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/gnukebox/fix-album-art.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -67,12 +67,12 @@
$aws_xml = simplexml_load_file($request) or die("xml response not loading");
$image = $aws_xml->Items->Item->MediumImage->URL;
-
+
if (!$image) { $image = "/i/qm50.png"; $license="librefm";}
if ($image) {
-
+
if ($license == "") { $license = "amazon"; }
$license = $adodb->qstr($license);
@@ -80,7 +80,7 @@
$album = $adodb->qstr($album);
$artist = $adodb->qstr($artist);
- $sql = ("UPDATE Album SET image = "
+ $sql = ("UPDATE Album SET image = "
. ($image) . ", "
Modified: trunk/gnukebox/install.php
===================================================================
--- trunk/gnukebox/install.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/gnukebox/install.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -166,7 +166,7 @@
streamurl VARCHAR(255),
otherid VARCHAR(16))");
}
-
+
$adodb->Execute("CREATE TABLE Scrobbles(
username VARCHAR(64) REFERENCES Users(username),
track VARCHAR(255),
@@ -226,7 +226,7 @@
username VARCHAR(64),
email VARCHAR(255),
code VARCHAR(32),
- expires INTEGER,
+ expires INTEGER,
PRIMARY KEY(username))");
$adodb->Execute("CREATE TABLE Radio_Sessions(
@@ -235,11 +235,11 @@
url VARCHAR(255),
expires INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY(username,session))");
-
- //Table for delete profile requests
+
+ //Table for delete profile requests
$adodb->Execute("CREATE TABLE Delete_Request (
- code VARCHAR(300),
- expires INTEGER,
+ code VARCHAR(300),
+ expires INTEGER,
username VARCHAR(64) REFERENCES Users(username),
PRIMARY KEY(code)");
Modified: trunk/gnukebox/scrobble-utils.php
===================================================================
--- trunk/gnukebox/scrobble-utils.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/gnukebox/scrobble-utils.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -21,7 +21,7 @@
require_once('database.php'); // include the database connection string
-function usernameFromSID($session_id)
+function usernameFromSID($session_id)
{
//derive the username from a session ID
@@ -198,7 +198,7 @@
$track = str_replace(' (PREVIEW: buy it at www.magnatune.com)', "", $track);
return $track;
-
+
}
function getAlbumArt($artist, $album) {
Modified: trunk/gnukebox/utils/human-time.php
===================================================================
--- trunk/gnukebox/utils/human-time.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/gnukebox/utils/human-time.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -25,9 +25,9 @@
function human_timestamp ($unix_timestamp, $now = null) {
if (is_null($now)) {
- $now = time();
+ $now = time();
}
-
+
$diff = $now - $unix_timestamp;
# ugly!
Modified: trunk/gnukebox/version.php
===================================================================
--- trunk/gnukebox/version.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/gnukebox/version.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -1,4 +1,4 @@
-<?php
+<?php
/* Libre.fm -- a free network service for sharing your music listening habits
Modified: trunk/nixtape/api/ArtistXML.php
===================================================================
--- trunk/nixtape/api/ArtistXML.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/api/ArtistXML.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -34,7 +34,7 @@
*/
public static function getInfo($artistName, $api_key=false,
$mbid=false, $lang='en') {
// We assume $api_key is valid and set at this point
-
+
if (!isset($artistName) && !isset($mbid)) {
echo XML::error('failed', '7', 'Invalid resource
specified');
return;
@@ -42,7 +42,7 @@
$artist = new Artist($artistName, $mbid);
- if (PEAR::isError($artist)) {
+ if (PEAR::isError($artist)) {
return(XML::error('failed', '7', 'Invalid resource
specified'));
}
@@ -86,7 +86,7 @@
$track->addChild('listeners',
$tracks[$i]->getListenerCount());
}
- return($xml);
+ return($xml);
}
}
Modified: trunk/nixtape/database2.php
===================================================================
--- trunk/nixtape/database2.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/database2.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -28,11 +28,11 @@
require_once('adodb/adodb-exceptions.inc.php');
require_once('adodb/adodb.inc.php');
-try {
+try {
$adodb =& NewADOConnection($adodb_connect_string);
-} catch (exception $e) {
- var_dump($e);
+} catch (exception $e) {
+ var_dump($e);
adodb_backtrace($e->gettrace());
-}
+}
?>
Modified: trunk/nixtape/group.php
===================================================================
--- trunk/nixtape/group.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/group.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -72,7 +72,7 @@
if (!PEAR::isError ($aUserTagCloud)) {
$smarty->assign('group_tagcloud',$aUserTagCloud);
}
-
+
$smarty->assign('userlist', $group->getUsers());
$smarty->assign('ismember', $group->memberCheck($this_user));
@@ -90,7 +90,7 @@
'href' =>
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '',
$_SERVER['REQUEST_URI']))
)
));
-
+
$smarty->assign('profile', true);
$smarty->display('group.tpl');
Modified: trunk/nixtape/install.php
===================================================================
--- trunk/nixtape/install.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/install.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -61,7 +61,7 @@
if(!$result) {
$print_config = str_replace('<', '<', $config);
die('Unable to write to file \'<i>config.php</i>\'. Please
create this file and copy the following in to it: <br /><pre>' . $print_config
. '</pre>');
- }
+ }
die('Configuration completed successfully!');
}
@@ -106,7 +106,7 @@
<br />
<h2>General</h2>
Default Theme: <select name="default_theme">
- <?php
+ <?php
$dir = opendir('themes');
while($theme = readdir($dir)) {
if(is_dir('themes/' . $theme) &&
$theme[0] != '.') {
Modified: trunk/nixtape/location.php
===================================================================
--- trunk/nixtape/location.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/location.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -31,20 +31,20 @@
$random = 'NEWID'; // I don't think we try to support MSSQL, but
here's how it's done theoretically anyway
else
$random = 'RANDOM'; // postgresql, sqlite, possibly others
-
+
if ($_REQUEST['country'])
{
$q = sprintf('SELECT u.* FROM Users u INNER JOIN Places p ON
u.location_uri=p.location_uri AND p.country=%s ORDER BY %s() LIMIT 100',
$mdb2->quote(strtoupper($_REQUEST['country']), 'text'),
$random);
-
+
$res = $mdb2->query($q);
-
+
while ( $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC) )
{
- $userlist[] = new User($row['username'], $row);
+ $userlist[] = new User($row['username'], $row);
}
-
+
$smarty->assign('country', strtoupper($_REQUEST['country']));
$res = $mdb2->query(sprintf('SELECT * FROM Countries WHERE country=%s
LIMIT 1',
$mdb2->quote(strtoupper($_REQUEST['country']), 'text')));
@@ -52,9 +52,9 @@
{
$smarty->assign('country_info', $row);
}
-
+
$smarty->assign('userlist', $userlist);
-
+
$smarty->assign('extra_head_links', array(
array(
'rel' => 'meta',
@@ -63,7 +63,7 @@
'href' =>
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '',
$_SERVER['REQUEST_URI']))
)
));
-
+
$smarty->display('location-country.tpl');
}
Modified: trunk/nixtape/rdf.php
===================================================================
--- trunk/nixtape/rdf.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/rdf.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -63,7 +63,7 @@
case 'json' :
if ($_GET['callback'])
{ header('Content-Type: text/javascript'); }
- else
+ else
{ header('Content-Type: application/json'); }
$ser = ARC2::getRDFJSONSerializer($conf);
break;
@@ -80,4 +80,4 @@
if ($_GET['callback']) {
print ');';
}
-
+
Modified: trunk/nixtape/reset.php
===================================================================
--- trunk/nixtape/reset.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/reset.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -44,10 +44,10 @@
}
$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
-
+
$password = '';
$chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
-
+
for ($i = 0; $i < 8; $i++) {
$password .= substr($chars, mt_rand(0, strlen($chars)-1), 1);
}
@@ -70,14 +70,14 @@
$username = $_POST['user'];
$res = $mdb2->query('SELECT * FROM Users WHERE username="'
- . $mdb2->quote($username, 'text'));
+ . $mdb2->quote($username, 'text'));
if (PEAR::isError($res) || $res->numRows() == 0) {
$errors .= "User not found.\n";
$smarty->assign('errors', $errors);
$smarty->display('error.tpl');
die();
- }
+ }
$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
$code = md5($username . $row['email'] . time());
$sql = 'INSERT INTO Recovery_Request (username, email, code, expires)
VALUES('
@@ -95,12 +95,12 @@
}
$url = $base_url . '/reset.php?code=' . $code;
- $content = "Hi!\n\nSomeone from the IP-address " . $_SERVER['REMOTE_ADDR']
. " entered your username "
+ $content = "Hi!\n\nSomeone from the IP-address " . $_SERVER['REMOTE_ADDR']
. " entered your username "
. "in the password reset form at libre.fm. To change you password,
please visit\n\n"
. $url . "\n\n- The Libre.fm Team";
sendEmail($content, $row['email']);
- $smarty->assign('sent', true);
-}
+ $smarty->assign('sent', true);
+}
$smarty->display('reset.tpl');
?>
Modified: trunk/nixtape/templating.php
===================================================================
--- trunk/nixtape/templating.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/templating.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -39,7 +39,7 @@
$lcomponents = preg_split('/-/', $languages[$i]);
$languages[$i] = $lcomponents[0] . '_' .
strtoupper($lcomponents[1]);
}
-
+
$languages[$i] = $languages[$i] . '.UTF-8';
}
}
@@ -59,7 +59,7 @@
$smarty->assign('base_url', $base_url);
$smarty->assign('this_page', $_SERVER['REQUEST_URI']);
$smarty->assign('this_page_absolute',
- (empty($_SERVER['HTTPS']) ? 'http://' : 'http://')
+ (empty($_SERVER['HTTPS']) ? 'http://' : 'http://')
.(empty($_SERVER['HOST']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HOST'])
.(($_SERVER['SERVER_PORT']==80) ? '' : (':'.$_SERVER['SERVER_PORT']))
. $_SERVER['REQUEST_URI']);
Modified: trunk/nixtape/user-edit.php
===================================================================
--- trunk/nixtape/user-edit.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/user-edit.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -113,10 +113,10 @@
$this_user->avatar_uri = $_POST['avatar_uri'];
$this_user->laconica_profile = $_POST['laconica_profile'];
$this_user->journal_rss = $_POST['journal_rss'];
-
+
if (!empty( $_POST['password_1'] ))
$user->password = md5($_POST['password_1']);
-
+
$this_user->save();
header('Location: ' . $this_user->getURL());
@@ -140,10 +140,10 @@
# Stuff which cannot be changed *here*
$smarty->assign('userlevel', $this_user->userlevel);
-
+
# Stuff which cannot be changed *yet*
$smarty->assign('email', $this_user->email);
-
+
if ($_POST['submit'])
{
$smarty->assign('id', $_POST['id']);
Modified: trunk/nixtape/user-groups.php
===================================================================
--- trunk/nixtape/user-groups.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/user-groups.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -46,7 +46,7 @@
$smarty->assign('isme', ($_SESSION['user']->name == $user->name));
$smarty->assign('me', $user);
$smarty->assign('profile', true);
-
+
$smarty->assign('groups', Group::groupList($user));
$smarty->assign('extra_head_links', array(
@@ -57,7 +57,7 @@
'href' =>
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '',
$user->getURL('groups')))
)
));
-
+
$smarty->display('user-groups.tpl');
} else {
$smarty->assign('error', 'User not found');
Modified: trunk/nixtape/user-journal.php
===================================================================
--- trunk/nixtape/user-journal.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/user-journal.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -90,4 +90,4 @@
)
));
$smarty->display('user-journal.tpl');
-
+
Modified: trunk/nixtape/user-profile.php
===================================================================
--- trunk/nixtape/user-profile.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/user-profile.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -53,7 +53,7 @@
$smarty->assign('me', $user);
$smarty->assign('sidebar', true);
$smarty->assign('sidebartemplate', 'profile-sidebar.tpl');
-
+
$smarty->assign('extra_head_links', array(
array(
'rel'=>'alternate',
@@ -74,7 +74,7 @@
'href' =>
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '',
$user->getURL()))
)
));
-
+
$smarty->display('user-profile.tpl');
} else {
$smarty->assign('error', 'User not found');
Modified: trunk/nixtape/user-recent-tracks.php
===================================================================
--- trunk/nixtape/user-recent-tracks.php 2009-05-14 03:55:34 UTC (rev
1553)
+++ trunk/nixtape/user-recent-tracks.php 2009-05-14 04:01:39 UTC (rev
1554)
@@ -53,7 +53,7 @@
$smarty->assign('isme', ($this_user->name == $user->name));
$smarty->assign('me', $user);
$smarty->assign('profile', true);
-
+
$smarty->assign('extra_head_links', array(
array(
'rel'=>'alternate',
Modified: trunk/nixtape/user-stats.php
===================================================================
--- trunk/nixtape/user-stats.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/user-stats.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -40,20 +40,20 @@
# if (!PEAR::isError ($aUserTagCloud)) {
# $smarty->assign('user_tagcloud',$aUserTagCloud);
# }
-
+
$smarty->assign('stat_barwidth', 320);
$aUserPlayStat = Statistic::GeneratePlayStats('Scrobbles', 'artist',
40, $user->name, 300);
if (!PEAR::isError ($aUserPlayStat)) {
$smarty->assign('user_playstats',$aUserPlayStat);
}
-
+
$aUserDayStat = Statistic::generatePlayByDays('Scrobbles', 40,
$user->name, 300);
if (!PEAR::isError ($aUserDayStat)) {
$smarty->assign('user_daystats',$aUserDayStat);
}
$smarty->assign('toptracks', $user->getTopTracks(40));
-
+
$smarty->assign('me', $user);
$smarty->assign('geo', Server::getLocationDetails($user->location_uri));
$smarty->assign('isme', ($this_user->name == $user->name));
@@ -66,7 +66,7 @@
'href' =>
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '',
$user->getURL()))
)
));
-
+
$smarty->assign('stats', true);
$smarty->display('user-stats.tpl');
} else {
Modified: trunk/nixtape/utils/arc/extractors/ARC2_DcExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_DcExtractor.php 2009-05-14
03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/extractors/ARC2_DcExtractor.php 2009-05-14
04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_DcExtractor($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -26,7 +26,7 @@
}
/* */
-
+
function extractRDF() {
$t_vals = array();
$t = '';
@@ -43,7 +43,7 @@
$this->addTs(ARC2::getTriplesFromIndex($doc));
}
}
-
+
/* */
function extractTitle($n, $t_vals, $t) {
@@ -52,7 +52,7 @@
}
return array($t_vals, $t);
}
-
+
/* */
function extractLink($n, $t_vals, $t) {
@@ -69,7 +69,7 @@
}
return array($t_vals, $t);
}
-
+
function extractMeta($n, $t_vals, $t) {
if ($this->hasAttribute('http-equiv', $n, 'Content-Type') ||
$this->hasAttribute('http-equiv', $n, 'content-type')) {
if ($v = $this->v('content', '', $n['a'])) {
@@ -78,7 +78,7 @@
}
return array($t_vals, $t);
}
-
+
/* */
-
+
}
Modified: trunk/nixtape/utils/arc/extractors/ARC2_ErdfExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_ErdfExtractor.php 2009-05-14
03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/extractors/ARC2_ErdfExtractor.php 2009-05-14
04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_ErdfExtractor($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -25,7 +25,7 @@
}
/* */
-
+
function extractRDF() {
if (!isset($this->caller->detected_formats['erdf'])) return 0;
$root_node = $this->getRootNode();
@@ -40,9 +40,9 @@
);
$this->processNode($root_node, $context);
}
-
+
/* */
-
+
function getRootNode() {
foreach ($this->nodes as $id => $node) {
if ($node['tag'] == 'html') {
@@ -51,7 +51,7 @@
}
return $this->nodes[0];
}
-
+
function getNamespaces() {
$r = array(
'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
@@ -66,7 +66,7 @@
}
/* */
-
+
function processNode($n, $ct) {
/* context */
//$ct['lang'] = $this->v('xml:lang', $ct['lang'], $n['a']);
@@ -85,7 +85,7 @@
$t = array(
's' => $ct['cur_res'],
's_type' => 'uri',
- 'p' => $uri,
+ 'p' => $uri,
'o' => $ct['cur_obj_literal']['value'],
'o_type' => 'literal',
'o_lang' => $ct['cur_obj_literal']['datatype'] ? '' :
$ct['cur_obj_literal']['lang'],
@@ -101,7 +101,7 @@
$t = array(
's' => $s,
's_type' => 'uri',
- 'p' => $ct['ns']['rdf'] . 'type',
+ 'p' => $ct['ns']['rdf'] . 'type',
'o' => trim($uri),
'o_type' => 'uri',
'o_lang' => '',
@@ -112,7 +112,7 @@
$t = array(
's' => $ct['prev_res'],
's_type' => 'uri',
- 'p' => $uri,
+ 'p' => $uri,
'o' => $ct['cur_res'],
'o_type' => 'uri',
'o_lang' => '',
@@ -123,7 +123,7 @@
$t = array(
's' => $ct['cur_res'],
's_type' => 'uri',
- 'p' => $uri,
+ 'p' => $uri,
'o' => $ct['cur_obj_literal']['value'],
'o_type' => 'literal',
'o_lang' => $ct['cur_obj_literal']['datatype'] ? '' :
$ct['cur_obj_literal']['lang'],
@@ -146,7 +146,7 @@
$t = array(
's' => $ct['cur_res'],
's_type' => 'uri',
- 'p' => $uri,
+ 'p' => $uri,
'o' => $o,
'o_type' => 'uri',
'o_lang' => '',
@@ -161,7 +161,7 @@
$t = array(
's' => $s,
's_type' => 'uri',
- 'p' => $uri,
+ 'p' => $uri,
'o' => $ct['cur_res'],
'o_type' => 'uri',
'o_lang' => '',
@@ -178,7 +178,7 @@
$t = array(
's' => $s,
's_type' => 'uri',
- 'p' => $ct['ns']['rdfs'] . 'label',
+ 'p' => $ct['ns']['rdfs'] . 'label',
'o' => $ct['cur_obj_literal']['value'],
'o_type' => 'literal',
'o_lang' => $ct['cur_obj_literal']['datatype'] ? '' :
$ct['cur_obj_literal']['lang'],
@@ -193,7 +193,7 @@
$t = array(
's' => $s,
's_type' => 'uri',
- 'p' => $ct['ns']['rdfs'] . 'label',
+ 'p' => $ct['ns']['rdfs'] . 'label',
'o' => $ct['cur_obj_literal']['value'],
'o_type' => 'literal',
'o_lang' => $ct['cur_obj_literal']['datatype'] ? '' :
$ct['cur_obj_literal']['lang'],
@@ -213,7 +213,7 @@
}
/* */
-
+
function getPropertyURIs($n, $ct) {
$r = array();
foreach (array('rel', 'rev', 'class', 'name', 'src') as $type) {
@@ -237,7 +237,7 @@
}
return $ct['cur_res'];
}
-
+
function getCurrentObjectID($n, $ct) {
foreach (array('href', 'src') as $a) {
if (isset($n['a'][$a])) {
@@ -261,9 +261,9 @@
}
return $r;
}
-
+
/* */
-
+
function xURI($v, $base, $ns, $attr_type = '') {
if ((list($sub_r, $sub_v) = $this->xQname($v, $base, $ns)) && $sub_r) {
return array($sub_r, $sub_v);
@@ -273,7 +273,7 @@
}
return array($this->calcURI($v, $base), '');
}
-
+
function xQname($v, $base, $ns) {
if ($sub_r = $this->x('([a-z0-9\-\_]+)[\-\.]([a-z0-9\-\_]+)', $v)) {
if (isset($ns[$sub_r[1]])) {
@@ -282,7 +282,7 @@
}
return array(0, $v);
}
-
+
/* */
}
Modified: trunk/nixtape/utils/arc/extractors/ARC2_OpenidExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_OpenidExtractor.php 2009-05-14
03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/extractors/ARC2_OpenidExtractor.php 2009-05-14
04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_OpenidExtractor($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -26,7 +26,7 @@
}
/* */
-
+
function extractRDF() {
$t_vals = array();
$t = '';
@@ -41,7 +41,7 @@
$this->addTs(ARC2::getTriplesFromIndex($doc));
}
}
-
+
/* */
function extractLink($n, $t_vals, $t) {
@@ -60,7 +60,7 @@
}
return array($t_vals, $t);
}
-
+
/* */
-
+
}
Modified: trunk/nixtape/utils/arc/extractors/ARC2_TwitterProfilePicExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_TwitterProfilePicExtractor.php
2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/extractors/ARC2_TwitterProfilePicExtractor.php
2009-05-14 04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_TwitterProfilePicExtractor($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -27,7 +27,7 @@
}
/* */
-
+
function extractRDF() {
$t_vals = array();
$t = '';
@@ -45,5 +45,5 @@
}
/* */
-
+
}
Modified: trunk/nixtape/utils/arc/store/ARC2_StoreDescribeQueryHandler.php
===================================================================
--- trunk/nixtape/utils/arc/store/ARC2_StoreDescribeQueryHandler.php
2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/store/ARC2_StoreDescribeQueryHandler.php
2009-05-14 04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {/* caller has to be a store */
parent::__construct($a, $caller);
}
-
+
function ARC2_StoreDescribeQueryHandler($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -27,7 +27,7 @@
}
/* */
-
+
function runQuery($infos) {
$ids = $infos['query']['result_uris'];
if ($vars = $infos['query']['result_vars']) {
@@ -56,25 +56,25 @@
$this->described_ids[] = $id;
if ($this->detect_labels) {
$q = '
- CONSTRUCT {
- <' . $id . '> ?p ?o .
- ?o ?label_p ?o_label .
+ CONSTRUCT {
+ <' . $id . '> ?p ?o .
+ ?o ?label_p ?o_label .
?o <http://arc.semsol.org/ns/arc#label> ?o_label .
- } WHERE {
+ } WHERE {
<' . $id . '> ?p ?o .
OPTIONAL {
?o ?label_p ?o_label .
- FILTER REGEX(str(?label_p),
"(name|label|title|summary|nick|fn)$", "i")
+ FILTER REGEX(str(?label_p),
"(name|label|title|summary|nick|fn)$", "i")
}
}
';
}
else {
$q = '
- CONSTRUCT {
- <' . $id . '> ?p ?o .
- } WHERE {
+ CONSTRUCT {
<' . $id . '> ?p ?o .
+ } WHERE {
+ <' . $id . '> ?p ?o .
}
';
}
@@ -85,9 +85,9 @@
}
return $this->r;
}
-
+
/* */
-
+
function mergeSubResults($index, $is_sub_describe = 1) {
foreach ($index as $s => $ps) {
if (!isset($this->r[$s])) $this->r[$s] = array();
@@ -115,7 +115,7 @@
if (!in_array($id, $this->described_ids)) $this->ids[] = $id;
}
}
-
+
/* */
}
Modified: trunk/nixtape/utils/arc/store/ARC2_StoreRSSLoader.php
===================================================================
--- trunk/nixtape/utils/arc/store/ARC2_StoreRSSLoader.php 2009-05-14
03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/store/ARC2_StoreRSSLoader.php 2009-05-14
04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_StoreRSSLoader($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -25,7 +25,7 @@
}
/* */
-
+
function addT($t) {
$this->caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'],
$t['o_datatype'], $t['o_lang']);
$this->t_count++;
Modified: trunk/nixtape/utils/arc/store/ARC2_StoreSemHTMLLoader.php
===================================================================
--- trunk/nixtape/utils/arc/store/ARC2_StoreSemHTMLLoader.php 2009-05-14
03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/store/ARC2_StoreSemHTMLLoader.php 2009-05-14
04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_StoreSemHTMLLoader($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -25,11 +25,11 @@
}
/* */
-
+
function done() {
$this->extractRDF();
}
-
+
function addT($t) {
$this->caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'],
$t['o_datatype'], $t['o_lang']);
$this->t_count++;
Modified: trunk/nixtape/utils/arc/store/ARC2_StoreTurtleLoader.php
===================================================================
--- trunk/nixtape/utils/arc/store/ARC2_StoreTurtleLoader.php 2009-05-14
03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/arc/store/ARC2_StoreTurtleLoader.php 2009-05-14
04:01:39 UTC (rev 1554)
@@ -15,7 +15,7 @@
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
-
+
function ARC2_StoreTurtleLoader($a = '', &$caller) {
$this->__construct($a, $caller);
}
@@ -25,7 +25,7 @@
}
/* */
-
+
function addT($t) {
$this->caller->addT($t['s'], $t['p'], $t['o'], $t['s_type'], $t['o_type'],
$t['o_datatype'], $t['o_lang']);
$this->t_count++;
Modified: trunk/nixtape/utils/human-time.php
===================================================================
--- trunk/nixtape/utils/human-time.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/human-time.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -25,9 +25,9 @@
function human_timestamp ($unix_timestamp, $now = null) {
if (is_null($now)) {
- $now = time();
+ $now = time();
}
-
+
$diff = $now - $unix_timestamp;
# ugly!
Modified: trunk/nixtape/utils/linkeddata.php
===================================================================
--- trunk/nixtape/utils/linkeddata.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/linkeddata.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -57,7 +57,7 @@
{
return
sprintf('http://dbtune.org/musicbrainz/resource/record/%s', strtolower($lmbid));
}
-
+
$u = identifierScrobbleEvent($username, $artist, $track, $album, $time,
$mbid, $ambid, $lmbid) . '.album';
if ($u != '.album') return $u;
@@ -73,7 +73,7 @@
$u = identifierScrobbleEvent($username, $artist, $track, $album, $time,
$mbid, $ambid, $lmbid) . '.track';
if ($u != '.track') return $u;
-
+
return sprintf('%s#track', Server::getTrackURL($artist, $album,
$track));
}
Modified: trunk/nixtape/utils/location-ws.php
===================================================================
--- trunk/nixtape/utils/location-ws.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/utils/location-ws.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -62,13 +62,13 @@
$_uri = parse_url($uri);
if (! $_uri['port'])
$_uri['port'] = 80;
-
+
if (! ($nh = fsockopen($_uri['host'], $_uri['port'], $errno, $errstr,
20)) )
{
header("Content-Type: text/plain");
die("Could not open network connection! ($errno -
$errstr)\r\n");
}
-
+
fwrite($nh, "GET {$_uri[path]}?{$_uri[query]} HTTP/1.0\r\n"
. "Host: {$_uri['host']}\r\n"
. "User-Agent: libre.fm\r\n"
@@ -80,7 +80,7 @@
$output .= fgets($nh, 128);
}
fclose($nh);
-
+
// Remove HTTP header.
echo substr(strstr($output, "\r\n\r\n"), 4);
}
Modified: trunk/nixtape/utils/random_code_generator.php
===================================================================
--- trunk/nixtape/utils/random_code_generator.php 2009-05-14 03:55:34 UTC
(rev 1553)
+++ trunk/nixtape/utils/random_code_generator.php 2009-05-14 04:01:39 UTC
(rev 1554)
@@ -20,7 +20,7 @@
/**
* Used for random code generation
- *
+ *
* @author piotrszulawski
* @return (String) code
*/
@@ -28,4 +28,4 @@
$code = md5(uniqid(mt_rand(rand(), rand()), true));
return $code;
}
-?>
\ No newline at end of file
+?>
Modified: trunk/nixtape/utils/resolve-external.php
===================================================================
--- trunk/nixtape/utils/resolve-external.php 2009-05-14 03:55:34 UTC (rev
1553)
+++ trunk/nixtape/utils/resolve-external.php 2009-05-14 04:01:39 UTC (rev
1554)
@@ -2,9 +2,9 @@
function resolve_external_url($url) {
if (substr($url, 0, 10) == 'jamendo://') {
return process_jamendo_url($url);
- }
+ }
- return $url;
+ return $url;
}
function process_jamendo_url($url) {
Modified: trunk/nixtape/utils/webid-finder-ws/form.php
===================================================================
--- trunk/nixtape/utils/webid-finder-ws/form.php 2009-05-14 03:55:34 UTC
(rev 1553)
+++ trunk/nixtape/utils/webid-finder-ws/form.php 2009-05-14 04:01:39 UTC
(rev 1554)
@@ -70,7 +70,7 @@
if ($_REQUEST['submit'])
{
require_once 'guts.php';
-
+
switch ($_REQUEST['source'])
{
case 'laconica' :
@@ -91,11 +91,11 @@
default :
$info = getBestGuess( $_REQUEST[
$_REQUEST['source'] ] );
}
-
+
if ($info['WebID'])
{
print "<div class=\"success\">\n";
- printf("<p>Found a WebID%s:<br /><tt id=\"webid\"
title=\"%s\">%s</tt></p>\n",
+ printf("<p>Found a WebID%s:<br /><tt id=\"webid\"
title=\"%s\">%s</tt></p>\n",
(empty($info['Name']) ? '' : (' for ' .
htmlentities($info['Name']))),
htmlentities($info['WebID']),
htmlentities($info['WebID']));
Modified: trunk/nixtape/utils/webid-finder-ws/guts.php
===================================================================
--- trunk/nixtape/utils/webid-finder-ws/guts.php 2009-05-14 03:55:34 UTC
(rev 1553)
+++ trunk/nixtape/utils/webid-finder-ws/guts.php 2009-05-14 04:01:39 UTC
(rev 1554)
@@ -35,7 +35,7 @@
extract(parse_url($absolute));
- $path = dirname($path);
+ $path = dirname($path);
if($relative{0} == '/')
{
@@ -66,11 +66,11 @@
if($scheme)
$url = "$scheme://";
-
+
if($user)
{
$url .= "$user";
- if ($pass)
+ if ($pass)
$url .= ":$pass";
$url .= "@";
}
@@ -99,13 +99,13 @@
$_uri = parse_url($uri);
if (! $_uri['port'])
$_uri['port'] = 80;
-
+
if (! ($nh = fsockopen($_uri['host'], $_uri['port'], $errno,
$errstr, 20)) )
{
header("Content-Type: text/plain");
die("Could not open network connection! ($errno -
$errstr)\r\n");
}
-
+
fwrite($nh, "GET {$_uri[path]}?{$_uri[query]} HTTP/1.0\r\n"
. "Host: {$_uri['host']}\r\n"
. "Connection: close\r\n\r\n"
@@ -115,11 +115,11 @@
$output .= fgets($nh, 128);
}
fclose($nh);
-
+
// Remove HTTP header.
return substr(strstr($output, "\r\n\r\n"), 4);
}
-
+
return null;
}
@@ -128,7 +128,7 @@
if (!preg_match('/^https?:\/\//i', $account ))
$account = "http://identi.ca/{$account}";
preg_replace('/\/$/', '', $account);
-
+
$foaf = $account . "/foaf";
return getFromFOAF($foaf);
@@ -142,12 +142,12 @@
else
$parser->parse($foaf, $data);
$index = $parser->getSimpleIndex();
-
+
if ($index[$foaf]['http://xmlns.com/foaf/0.1/primaryTopic'][0])
{
$webid =
$index[$foaf]['http://xmlns.com/foaf/0.1/primaryTopic'][0];
}
-
+
if (!$webid)
{
foreach ($index as $subject => $dummy)
@@ -176,7 +176,7 @@
}
}
}
-
+
if ($webid)
{
$r = array(
@@ -184,13 +184,13 @@
'Pages' =>
$index[$webid]['http://xmlns.com/foaf/0.1/homepage'],
'Name' =>
$index[$webid]['http://xmlns.com/foaf/0.1/name'][0]
);
-
+
if (substr($r['WebID'], 0, 2) == '_:')
$r['WebID'] = 'http://thing-described-by.org/?'.$foaf;
-
+
return $r;
}
-
+
return null;
}
@@ -217,7 +217,7 @@
$doc->loadHTML( $str );
error_reporting($e);
$links = $doc->getElementsByTagName('link');
-
+
foreach ($links as $l)
{
if ( preg_match('/\b(meta)\b/i', $l->getAttribute('rel')) )
@@ -237,7 +237,7 @@
$api =
"http://socialgraph.apis.google.com/lookup?pretty=1&sgn=1&edi=1&edo=1&fme=1&q={$url}";
$data = json_decode( _http($api) , 1 );
$canon = $data['canonical_mapping'][$url];
-
+
if (substr($canon, 0, 3) == 'sgn')
{
return array(
Modified: trunk/nixtape/version.php
===================================================================
--- trunk/nixtape/version.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/nixtape/version.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -1,4 +1,4 @@
-<?php
+<?php
/* Libre.fm -- a free network service for sharing your music listening habits
Modified: trunk/tests/index.php
===================================================================
--- trunk/tests/index.php 2009-05-14 03:55:34 UTC (rev 1553)
+++ trunk/tests/index.php 2009-05-14 04:01:39 UTC (rev 1554)
@@ -26,7 +26,7 @@
# Testing if we have an array as result
$this->assertIsA(TagCloud::generateTagCloud('Scrobbles', 'artist', 20,
null), 'array');
}
-
+
function login ($username, $password) {
$timestamp = time();
$token = md5(md5($password) . $timestamp);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1554] whitespace,
Clint Adams <=