Example #1
0
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_("Nachrichten"));
     PageLayout::setHelpKeyword("Basis.InteraktionNachrichten");
     if (Request::isXhr() && Request::isGet()) {
         $request = Request::getInstance();
         foreach (words('default_body default_subject') as $key) {
             $request[$key] = Request::removeMagicQuotes($_GET[$key]);
         }
     }
 }
 /**
  * Augment the given URL by appending all registered link parameters.
  * Note that for each bound variable, its current value is used. You
  * can use the second parameter to add futher URL parameters to this
  * link without adding them globally. Any parameters included in the
  * argument list take precedence over registered link parameters of
  * the same name.
  *
  * @param string $url    relative or absolute URL
  * @param array  $params array of additional link parameters to add
  *
  * @return string modified URL
  */
 static function getURL($url = '', $params = NULL)
 {
     $link_params = self::$params;
     list($url, $fragment) = explode('#', $url);
     list($url, $query) = explode('?', $url);
     if ($url !== '') {
         $url = self::resolveURL($url);
     }
     if (isset($query)) {
         parse_str($query, $query_params);
         $query_params = Request::removeMagicQuotes($query_params);
         $link_params = array_merge($link_params, $query_params);
     }
     if (isset($params)) {
         $link_params = array_merge($link_params, $params);
     }
     $query_string = http_build_query($link_params);
     if (strlen($query_string) || $url === '') {
         $url .= '?' . $query_string;
     }
     if (isset($fragment)) {
         $url .= '#' . $fragment;
     }
     return $url;
 }