/** * Handles uploading files */ public static function handleUploads() { // Pokud už bylo voláno handleUploads -> skonči if (self::$handleUploadsCalled === true) { return; } else { self::$handleUploadsCalled = true; } $req = Environment::getHttpRequest(); // Workaround for: http://forum.nettephp.com/cs/3680-httprequest-getheaders-a-content-type $contentType = $req->getHeader("content-type"); if (!$contentType and isset($_SERVER["CONTENT_TYPE"])) { $contentType = $_SERVER["CONTENT_TYPE"]; } if ($req->getMethod() !== "POST") { return; } self::getQueuesModel()->initialize(); foreach (self::getUIRegistrator()->getInterfaces() as $interface) { if ($interface->isThisYourUpload()) { $ret = $interface->handleUploads(); if ($ret === true) { break; } } } }