Skip to content
Snippets Groups Projects
public.php 443 B
Newer Older
Felix Moeller's avatar
Felix Moeller committed
$RUNTIME_NOAPPS = true;
Thomas Müller's avatar
Thomas Müller committed
require_once 'lib/base.php';
if (!isset($_GET['service'])) {
	header('HTTP/1.0 404 Not Found');
	exit;
}
$file = OCP\CONFIG::getAppValue('core', 'public_' . strip_tags($_GET['service']));
Thomas Müller's avatar
Thomas Müller committed
if(is_null($file)) {
	header('HTTP/1.0 404 Not Found');
	exit;
}
Thomas Müller's avatar
Thomas Müller committed
$parts=explode('/', $file, 2);
OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);

Thomas Müller's avatar
Thomas Müller committed
require_once OC_App::getAppPath($app) .'/'. $parts[1];