[xiph-commits] r14769 - in branches/dir.xiph.org: . cgi-bin

balbinus at svn.xiph.org balbinus at svn.xiph.org
Thu Apr 17 07:30:37 PDT 2008


Author: balbinus
Date: 2008-04-17 07:30:36 -0700 (Thu, 17 Apr 2008)
New Revision: 14769

Modified:
   branches/dir.xiph.org/by_format.php
   branches/dir.xiph.org/by_genre.php
   branches/dir.xiph.org/cgi-bin/yp.php
   branches/dir.xiph.org/search.php
Log:
Tag cloud is a genfile now + don't even query the SQL server if SID is -1.

Modified: branches/dir.xiph.org/by_format.php
===================================================================
--- branches/dir.xiph.org/by_format.php	2008-04-17 11:54:51 UTC (rev 14768)
+++ branches/dir.xiph.org/by_format.php	2008-04-17 14:30:36 UTC (rev 14769)
@@ -95,7 +95,7 @@
 $tpl->assign('servers_total', $memcache->get(ENVIRONMENT.'_servers_total'));
 $tpl->assign('servers_mp3', $memcache->get(ENVIRONMENT.'_servers_'.CONTENT_TYPE_MP3));
 $tpl->assign('servers_vorbis', $memcache->get(ENVIRONMENT.'_servers_'.CONTENT_TYPE_OGG_VORBIS));
-$tpl->assign('tag_cloud', $memcache->get(ENVIRONMENT.'_tagcloud'));
+$tpl->assign('tag_cloud', genfile::get(genfile::makeGenfileName('tagcloud')));
 $tpl->display('search.tpl');
 
 // Footer

Modified: branches/dir.xiph.org/by_genre.php
===================================================================
--- branches/dir.xiph.org/by_genre.php	2008-04-17 11:54:51 UTC (rev 14768)
+++ branches/dir.xiph.org/by_genre.php	2008-04-17 14:30:36 UTC (rev 14769)
@@ -99,7 +99,7 @@
 $tpl->assign('servers_total', $memcache->get(ENVIRONMENT.'_servers_total'));
 $tpl->assign('servers_mp3', $memcache->get(ENVIRONMENT.'_servers_'.CONTENT_TYPE_MP3));
 $tpl->assign('servers_vorbis', $memcache->get(ENVIRONMENT.'_servers_'.CONTENT_TYPE_OGG_VORBIS));
-$tpl->assign('tag_cloud', $memcache->get(ENVIRONMENT.'_tagcloud'));
+$tpl->assign('tag_cloud', genfile::get(genfile::makeGenfileName('tagcloud')));
 $tpl->display('search.tpl');
 
 // Footer

Modified: branches/dir.xiph.org/cgi-bin/yp.php
===================================================================
--- branches/dir.xiph.org/cgi-bin/yp.php	2008-04-17 11:54:51 UTC (rev 14768)
+++ branches/dir.xiph.org/cgi-bin/yp.php	2008-04-17 14:30:36 UTC (rev 14769)
@@ -118,7 +118,7 @@
             $mountpoint = Mountpoint::findSimilar($stream_name,
                                                   content_type_lookup($media_type),
                                                   $bitrate);
-		
+		    
 		    // Mountpoint
 		    if (!($mp instanceOf Mountpoint))
 		    {
@@ -241,6 +241,10 @@
 		    
 		    // SID
 		    $sid = preg_replace('/[^A-F0-9\-]/', '', strtoupper(clean_string($_REQUEST['sid'])));
+		    if ($sid == '-1')
+		    {
+		        throw new NoSuchSIDAPIException();
+		    }
 		    // Remote IP
 		    $ip = array_key_exists('REMOTE_ADDR', $_SERVER)
 		            ? $_SERVER['REMOTE_ADDR'] : null;
@@ -254,7 +258,7 @@
 		    // Max listeners
 		    $max_listeners = array_key_exists('max_listeners', $_REQUEST)
         		             ? intval($_REQUEST['max_listeners']) : 0;
-		
+		    
 		    // Find the server
 		    $server = Server::retrieveBySID($sid, true);
 		    if (!($server instanceOf Server))

Modified: branches/dir.xiph.org/search.php
===================================================================
--- branches/dir.xiph.org/search.php	2008-04-17 11:54:51 UTC (rev 14768)
+++ branches/dir.xiph.org/search.php	2008-04-17 14:30:36 UTC (rev 14769)
@@ -134,7 +134,7 @@
 $tpl->assign('servers_total', $memcache->get(ENVIRONMENT.'_servers_total'));
 $tpl->assign('servers_mp3', $memcache->get(ENVIRONMENT.'_servers_'.CONTENT_TYPE_MP3));
 $tpl->assign('servers_vorbis', $memcache->get(ENVIRONMENT.'_servers_'.CONTENT_TYPE_OGG_VORBIS));
-$tpl->assign('tag_cloud', $memcache->get(ENVIRONMENT.'_tagcloud'));
+$tpl->assign('tag_cloud', genfile::get(genfile::makeGenfileName('tagcloud')));
 $tpl->display('search.tpl');
 
 // Footer



More information about the commits mailing list