return $this->url($_GET['q']);
}
- /**
- * Generate an internal CiviCRM URL (copied from DRUPAL/includes/common.inc#url)
- *
- * @param $path string The path being linked to, such as "civicrm/add"
- * @param $query string A query string to append to the link.
- * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:).
- * Useful for links that will be displayed outside the site, such as in an
- * RSS feed.
- * @param $fragment string A fragment identifier (named anchor) to append to the link.
- * @param $htmlize boolean whether to convert to html eqivalant
- * @param $frontend boolean a gross joomla hack
- *
- * @return string an HTML string containing a link to the given path.
- * @access public
- *
- */
- function url($path = NULL, $query = NULL, $absolute = FALSE,
- $fragment = NULL, $htmlize = TRUE,
- $frontend = FALSE
- ) {
- $config = CRM_Core_Config::singleton();
- $script = 'index.php';
-
- $path = CRM_Utils_String::stripPathChars($path);
-
- if (isset($fragment)) {
- $fragment = '#' . $fragment;
- }
-
- if (!isset($config->useFrameworkRelativeBase)) {
- $base = parse_url($config->userFrameworkBaseURL);
- $config->useFrameworkRelativeBase = $base['path'];
- }
- $base = $absolute ? $config->userFrameworkBaseURL : $config->useFrameworkRelativeBase;
-
- $separator = $htmlize ? '&' : '&';
-
- if (!$config->cleanURL) {
- if (isset($path)) {
- if (isset($query)) {
- return $base . $script . '?q=' . $path . $separator . $query . $fragment;
- }
- else {
- return $base . $script . '?q=' . $path . $fragment;
- }
- }
- else {
- if (isset($query)) {
- return $base . $script . '?' . $query . $fragment;
- }
- else {
- return $base . $fragment;
- }
- }
- }
- else {
- if (isset($path)) {
- if (isset($query)) {
- return $base . $path . '?' . $query . $fragment;
- }
- else {
- return $base . $path . $fragment;
- }
- }
- else {
- if (isset($query)) {
- return $base . $script . '?' . $query . $fragment;
- }
- else {
- return $base . $fragment;
- }
- }
- }
- }
-
/**
* Authenticate the user against the drupal db
*
return false;
}
$hour = $user->timezone / 3600;
- $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, ($timezone/60)%60 );
+ $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, abs(($timeZoneOffset/60)%60));
if($timeZoneOffset > 0){
$timeZoneOffset = '+' . $timeZoneOffset;
}