Projekt

Allgemein

Profil

GX-Task #53496 » HttpViewControllerFix.patch

Till Tepelmann, 01.10.2017 21:09

Unterschiede anzeigen:

src/GXEngine/Services/System/Http/HttpViewController.inc.php (revision )
286 286
			throw new Exception($customExceptionMessage ? : 'Provided $_POST["pageToken"] variable is not valid.');
287 287
		}
288 288
	}
289
	
290
	
291
	/**
292
	 * Searches the GXModules directory for a template file,
293
	 * wich can be useed inside the AdminLayoutHttpControllerResponse object for the template parameter.
294
	 *
295
	 * @param string $templateFile The relative path or filename to search for
296
	 *
297
	 * @throws Exception if the path or file is not found inside the GXModules directory
298
	 */
299
	protected function getTemplateFile($templateFile)
300
	{
301
		$gxModuleFiles = GXModulesCache::getFiles();
302
		
303
		foreach($gxModuleFiles as $file)
304
		{
305
			$strpos = strpos($file, $templateFile);
306
			
307
			if($strpos !== false)
308
			{
309
				return new ExistingFile(new NonEmptyStringType($file));
310
			}
311
		}
312
		
313
		throw new Exception('Provided template file not found in GXModules directory: ' . $templateFile);
314
	}
289 315
}
    (1-1/1)