[Devel] r183 - trunk

svn at agendadulibre.org svn at agendadulibre.org
Sam 9 Sep 21:58:46 CEST 2006


Author: thomas
Date: Sat Sep  9 21:58:45 2006
New Revision: 183

Modified:
   trunk/funcs.inc.php

Log:

 * funcs.inc.php:

  - Quand il n'y a pas de protocole explicitement donné en argument de
    calendar_absolute_url(), on ne prend plus "http" par défaut. On ne
    spécifie rien, ce qui permet de conserver http:// si on navigue
    sur le site en http:// ou https:// si on navigue sur le site en
    https://.



Modified: trunk/funcs.inc.php
==============================================================================
--- trunk/funcs.inc.php	(original)
+++ trunk/funcs.inc.php	Sat Sep  9 21:58:45 2006
@@ -25,11 +25,14 @@
  *
  * @param[in] Relative URL in the website
  */
-function calendar_absolute_url($url="", $protocol="http")
+function calendar_absolute_url($url="", $protocol="")
 {
   global $root;
   $root = rtrim ($root, "/");
-  return $protocol . "://" . $root . "/" . $url;
+  if ($protocol != "")
+    return $protocol . "://" . $root . "/" . $url;
+  else
+    return $root . "/" . $url;
 }
 
 function calendar_setlocale()


More information about the Devel mailing list