$utils->sendSecurityHeaders();
// Initialize the HTML document with our basic elements.
-extract($utils->initHTMLDocument('Authorization Request | KaiRo.at', 'KaiRo.at Authentication Server')); // sets $document, $html, $head, $title, $body
+extract($utils->initHTMLDocument(sprintf(_('Authorization Request | %s'), $utils->settings['operator_name']),
+ sprintf(_('%s Authentication Server'), $utils->settings['operator_name']))); // sets $document, $html, $head, $title, $body
if (!count($errors)) {
$session = $utils->initSession(); // Read session or create new session and set cookie.
$user = array('id' => 0, 'email' => '');
}
if (is_null($session)) {
- $errors[] = _('The session system is not working.').' '._('Please <a href="https://www.kairo.at/contact">contact KaiRo.at</a> and tell the team about this.');
+ $errors[] = _('The session system is not working.').' '
+ .sprintf(_('Please <a href="%s">contact %s</a> and tell the team about this.'), $utils->settings['operator_contact_url'], $utils->settings['operator_name']);
}
elseif ($session['logged_in']) {
// We are logged in, process authorization request.
$session = $utils->getLoginSession($user['id'], $session);
}
}
+ if ($settings['piwik_enabled']) {
+ // If we do not send out an HTML file, we need to do the Piwik tracking ourselves.
+ require_once($settings['piwik_tracker_path'].'PiwikTracker.php');
+ PiwikTracker::$URL = ((strpos($settings['piwik_url'], '://') === false) ? 'http://localhost' : '' ).$settings['piwik_url'];
+ $piwikTracker = new PiwikTracker($idSite = $settings['piwik_site_id']);
+ $piwikTracker->doTrackPageView('Handle Authorize Request');
+ }
// Handle authorize request, forwarding code in GET parameters if the user has authorized your client.
$server->handleAuthorizeRequest($request, $response, $is_authorized, $user['id']);
/* For testing only