use client?s mimetype as fallback for uploads

This commit is contained in:
coderkun 2014-05-03 22:37:04 +02:00
commit a75696e4e7
3468 changed files with 596986 additions and 0 deletions

View file

@ -0,0 +1,68 @@
<?php
/**
* The Legend of Z
*
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
* @copyright 2014 Heinrich-Heine-Universität Düsseldorf
* @license http://www.gnu.org/licenses/gpl.html
* @link https://bitbucket.org/coderkun/the-legend-of-z
*/
namespace hhu\z\controllers;
/**
* Controller of the HtmlAgent to display a HTML-page.
*
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
*/
class HtmlController extends \hhu\z\Controller
{
/**
* Required components
*
* @var array
*/
public $components = array('notification');
/**
* Prefilter.
*
* @param Request $request Current request
* @param Response $response Current response
*/
public function preFilter(\nre\core\Request $request, \nre\core\Response $response)
{
parent::preFilter($request, $response);
// Set content-type
$this->response->addHeader("Content-type: text/html; charset=utf-8");
}
/**
* Action: index.
*
* Create the HTML-structure.
*/
public function index()
{
// Set the name of the current IntermediateAgent as page title
$this->set('title', $this->request->getParam(1, 'intermediate'));
// Set userdata
$this->set('loggedUser', IntermediateController::$user);
$this->set('loggedSeminary', SeminaryController::$seminary);
$this->set('loggedCharacter', SeminaryController::$character);
// Set notifications
$this->set('notifications', $this->Notification->getNotifications());
}
}
?>