added GitHub API support (show release info)

new dialog (show release info)
fixed caching timings (main ajax update trigger calls)
fixed footer "current year" number
This commit is contained in:
Exodus4D
2016-01-16 15:09:58 +01:00
parent 6bf0a1aa77
commit 3f4d33a3a9
29 changed files with 459 additions and 84 deletions

View File

@@ -434,6 +434,21 @@ class Controller {
return $url;
}
/**
* get a custom userAgent string for API calls
* @return string
*/
protected function getUserAgent(){
$userAgent = '';
$userAgent .= $this->getF3()->get('PATHFINDER.NAME');
$userAgent .= ' - ' . $this->getF3()->get('PATHFINDER.VERSION');
$userAgent .= ' | ' . $this->getF3()->get('PATHFINDER.CONTACT');
$userAgent .= ' (' . $_SERVER['SERVER_NAME'] . ')';
return $userAgent;
}
/**
* onError() callback function
* -> on AJAX request -> return JSON with error information
@@ -475,6 +490,7 @@ class Controller {
if($f3->get('AJAX')){
header('Content-type: application/json');
echo json_encode($return);
die();
}else{
// set error data for template rendering
$error->redirectUrl = $this->getRouteUrl();