librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1417] Correct encoding of <link rel=meta> URLs; add <


From: Toby Inkster
Subject: [Librefm-commits] [1417] Correct encoding of <link rel=meta> URLs; add <link rel=meta> to track, artist and album pages.
Date: Fri, 08 May 2009 16:22:07 +0000

Revision: 1417
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1417
Author:   tobyink
Date:     2009-05-08 16:22:06 +0000 (Fri, 08 May 2009)
Log Message:
-----------
Correct encoding of <link rel=meta> URLs; add <link rel=meta> to track, artist 
and album pages.

Modified Paths:
--------------
    trunk/nixtape/album.php
    trunk/nixtape/artist.php
    trunk/nixtape/group.php
    trunk/nixtape/location.php
    trunk/nixtape/track.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

Modified: trunk/nixtape/album.php
===================================================================
--- trunk/nixtape/album.php     2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/album.php     2009-05-08 16:22:06 UTC (rev 1417)
@@ -36,6 +36,15 @@
        $smarty->assign("tracks", $aAlbumTracks);
 }
 
+$smarty->assign('extra_head_links', array(
+               array(
+                       'rel' => 'meta',
+                       'type' => 'application/rdf+xml' ,
+                       'title' => 'Album Metadata',
+                       'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(htmlentities(str_replace($base_url,
 '', $album>getURL())))
+                       )
+       ));
+       
 $smarty->display("album.tpl");
 
 

Modified: trunk/nixtape/artist.php
===================================================================
--- trunk/nixtape/artist.php    2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/artist.php    2009-05-08 16:22:06 UTC (rev 1417)
@@ -42,6 +42,15 @@
        $smarty->assign("albums", $aArtistAlbums);
 }
 
+$smarty->assign('extra_head_links', array(
+               array(
+                       'rel' => 'meta',
+                       'type' => 'application/rdf+xml' ,
+                       'title' => 'FOAF',
+                       'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$artist>getURL()))
+                       )
+       ));
+
 $smarty->display("artist.tpl");
 
 

Modified: trunk/nixtape/group.php
===================================================================
--- trunk/nixtape/group.php     2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/group.php     2009-05-08 16:22:06 UTC (rev 1417)
@@ -33,7 +33,7 @@
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$_SERVER['REQUEST_URI']))
                                )
                ));
        $aTagCloud = TagCloud::GenerateTagCloud(TagCloud::scrobblesTable(), 
'artist');
@@ -87,7 +87,7 @@
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$_SERVER['REQUEST_URI']))
                                )
                ));
        

Modified: trunk/nixtape/location.php
===================================================================
--- trunk/nixtape/location.php  2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/location.php  2009-05-08 16:22:06 UTC (rev 1417)
@@ -60,7 +60,7 @@
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$_SERVER['REQUEST_URI']))
                                )
                ));
                

Modified: trunk/nixtape/track.php
===================================================================
--- trunk/nixtape/track.php     2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/track.php     2009-05-08 16:22:06 UTC (rev 1417)
@@ -54,5 +54,14 @@
 
 $smarty->assign("albums", $aOtherAlbums);
 
+$smarty->assign('extra_head_links', array(
+               array(
+                       'rel' => 'meta',
+                       'type' => 'application/rdf+xml' ,
+                       'title' => 'Track Metadata',
+                       'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$track>getURL()))
+                       )
+       ));
+
 $smarty->display("track.tpl");
 ?>

Modified: trunk/nixtape/user-groups.php
===================================================================
--- trunk/nixtape/user-groups.php       2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/user-groups.php       2009-05-08 16:22:06 UTC (rev 1417)
@@ -54,7 +54,7 @@
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', 
$user->getURL('groups')))
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$user->getURL('groups')))
                                )
                ));
                

Modified: trunk/nixtape/user-journal.php
===================================================================
--- trunk/nixtape/user-journal.php      2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/user-journal.php      2009-05-08 16:22:06 UTC (rev 1417)
@@ -86,7 +86,7 @@
                        'rel' => 'meta',
                        'type' => 'application/rdf+xml' ,
                        'title' => 'FOAF',
-                       'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', 
$user->getURL()))
+                       'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$user->getURL()))
                        )
        ));
 $smarty->display('user-journal.tpl');

Modified: trunk/nixtape/user-profile.php
===================================================================
--- trunk/nixtape/user-profile.php      2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/user-profile.php      2009-05-08 16:22:06 UTC (rev 1417)
@@ -59,7 +59,7 @@
                                'rel'=>'alternate',
                                'type' => 'application/rss+xml' ,
                                'title' => 'RSS 1.0 Feed (Recent plays)',
-                               'href' => 
$base_url.'/rdf.php?fmt=rss&page='.htmlentities(str_replace($base_url, '', 
$user->getURL('recent-tracks')))
+                               'href' => 
$base_url.'/rdf.php?fmt=rss&page='.urlencode(str_replace($base_url, '', 
$user->getURL('recent-tracks')))
                                ),
                        array(
                                'rel'=>'alternate',
@@ -71,7 +71,7 @@
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', 
$user->getURL()))
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$user->getURL()))
                                )
                ));
        

Modified: trunk/nixtape/user-recent-tracks.php
===================================================================
--- trunk/nixtape/user-recent-tracks.php        2009-05-08 16:07:09 UTC (rev 
1416)
+++ trunk/nixtape/user-recent-tracks.php        2009-05-08 16:22:06 UTC (rev 
1417)
@@ -59,13 +59,13 @@
                                'rel'=>'alternate',
                                'type' => 'application/rss+xml' ,
                                'title' => 'RSS 1.0 Feed (Recent plays)',
-                               'href' => 
$base_url.'/rdf.php?fmt=rss&page='.htmlentities(str_replace($base_url, '', 
$user->getURL('recent-tracks')))
+                               'href' => 
$base_url.'/rdf.php?fmt=rss&page='.urlencode(str_replace($base_url, '', 
$user->getURL('recent-tracks')))
                                ),
                        array(
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', 
$user->getURL()))
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$user->getURL()))
                                )
                ));
 

Modified: trunk/nixtape/user-stats.php
===================================================================
--- trunk/nixtape/user-stats.php        2009-05-08 16:07:09 UTC (rev 1416)
+++ trunk/nixtape/user-stats.php        2009-05-08 16:22:06 UTC (rev 1417)
@@ -63,7 +63,7 @@
                                'rel' => 'meta',
                                'type' => 'application/rdf+xml' ,
                                'title' => 'FOAF',
-                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', 
$user->getURL()))
+                               'href' => 
$base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', 
$user->getURL()))
                                )
                ));
        





reply via email to

[Prev in Thread] Current Thread [Next in Thread]