Don't use PATH_INFO directly, use Util::getPathInfo()
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 13 Feb 2009 21:35:56 +0000 (16:35 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 13 Feb 2009 21:35:56 +0000 (16:35 -0500)
kronolith/fb.php
kronolith/ics.php

index 55a48db..c8ac772 100644 (file)
@@ -24,8 +24,8 @@ if (!empty($cal)) {
     if (is_array($cal)) {
         $cal = implode('|', $cal);
     }
-} elseif (!empty($_SERVER['PATH_INFO'])) {
-    $user = basename($_SERVER['PATH_INFO']);
+} elseif ($pathInfo = Util::getPathInfo()) {
+    $user = basename($pathInfo);
 }
 
 $cache = Horde_Cache::factory($conf['cache']['driver'], Horde::getDriverConfig('cache', $conf['cache']['driver']));
index 180f4c3..6ccdfa7 100644 (file)
@@ -19,8 +19,8 @@ NLS::setCharset('UTF-8');
 
 // Determine which calendar to export.
 $calendar = Util::getFormData('c');
-if (empty($calendar) && !empty($_SERVER['PATH_INFO'])) {
-    $calendar = basename($_SERVER['PATH_INFO']);
+if (empty($calendar) && $pathInfo = Util::getPathInfo()) {
+    $calendar = basename($pathInfo);
 }
 
 $share = $kronolith_shares->getShare($calendar);