Exemplo n.º 1
0
 /**
  * Returns the current relative url without trailing slashes. Does NOT include base url.
  * The current url will always start with a slash "/".
  */
 public static function current()
 {
     if (is_null(self::$_current)) {
         if (isset($_GET['r']) && strlen($_GET['r'])) {
             self::$_current = $_GET['r'];
         }
         if (Multilanguage::urlHasLangCode(self::$_current)) {
             self::$_current = substr(self::$_current, 3);
         }
         if (!strlen(self::$_current)) {
             self::$_current = '/';
         } else {
             self::$_current = '/' . trim(self::$_current, '/');
         }
     }
     return self::$_current;
 }