[xiph-commits] r14688 - in branches/dir.xiph.org: cronjobs inc templates

balbinus at svn.xiph.org balbinus at svn.xiph.org
Thu Apr 10 05:43:27 PDT 2008


Author: balbinus
Date: 2008-04-10 05:43:26 -0700 (Thu, 10 Apr 2008)
New Revision: 14688

Modified:
   branches/dir.xiph.org/cronjobs/check_servers.php
   branches/dir.xiph.org/inc/prepend.php
   branches/dir.xiph.org/templates/yp.xml.tpl
Log:
Quickfixes.

Modified: branches/dir.xiph.org/cronjobs/check_servers.php
===================================================================
--- branches/dir.xiph.org/cronjobs/check_servers.php	2008-04-09 02:51:44 UTC (rev 14687)
+++ branches/dir.xiph.org/cronjobs/check_servers.php	2008-04-10 12:43:26 UTC (rev 14688)
@@ -26,7 +26,8 @@
         
         // Now, verify!
         if (empty($url['scheme']) || $url['scheme'] != 'http'
-            || !array_key_exists('host', $url))
+            || !array_key_exists('host', $url)
+            || !preg_match('/^.*[A-Za-z0-9\-]+\.[A-Za-z0-9]+$/', $url['host']))
         {
             throw new ToDeleteException();
         }

Modified: branches/dir.xiph.org/inc/prepend.php
===================================================================
--- branches/dir.xiph.org/inc/prepend.php	2008-04-09 02:51:44 UTC (rev 14687)
+++ branches/dir.xiph.org/inc/prepend.php	2008-04-10 12:43:26 UTC (rev 14688)
@@ -52,5 +52,6 @@
 // Libs
 include_once(dirname(__FILE__).'/lib.uuidgen.php');
 include_once(dirname(__FILE__).'/lib.dir.php');
+include_once(dirname(__FILE__).'/lib.utils.php');
 
 ?>

Modified: branches/dir.xiph.org/templates/yp.xml.tpl
===================================================================
--- branches/dir.xiph.org/templates/yp.xml.tpl	2008-04-09 02:51:44 UTC (rev 14687)
+++ branches/dir.xiph.org/templates/yp.xml.tpl	2008-04-10 12:43:26 UTC (rev 14688)
@@ -2,14 +2,14 @@
 <directory>
 {foreach item=stream from=$streams}
     <entry>
-        <server_name>{$stream.stream_name|escape}</server_name>
+        <server_name>{$stream.stream_name|force_utf8|escape}</server_name>
         <listen_url>{$stream.listen_url|escape}</listen_url>
         <server_type>{$stream.media_type_id|get_mime_type_string}</server_type>
         <bitrate>{$stream.bitrate|escape}</bitrate>
         <channels>{$stream.channels|intval}</channels>
         <samplerate>{$stream.samplerate|intval}</samplerate>
-        <genre>{$stream.genre|escape}</genre>
-        <current_song>{$stream.current_song|escape}</current_song>
+        <genre>{$stream.genre|force_utf8|escape}</genre>
+        <current_song>{$stream.current_song|force_utf8|escape}</current_song>
     </entry>
 {/foreach}
 </directory>



More information about the commits mailing list