Example #1
0
// show image from temp folder
if (isset($_GET['showImage'])) {
	readFileResource('showImage', TMP_DIR . 'install/files/acp/images/');
}
// show icon from temp folder
if (isset($_GET['showIcon'])) {
	readFileResource('showIcon', TMP_DIR . 'install/files/icon/');
}
// show css from temp folder
if (isset($_GET['showCSS'])) {
	readFileResource('showCSS', TMP_DIR . 'install/files/acp/style/setup/');
}
// show fonts from temp folder
if (isset($_GET['showFont'])) {
	readFileResource('showFont', TMP_DIR . 'install/files/font/');
}

// check whether setup files are already unzipped
if (!file_exists(TMP_DIR . 'install/files/lib/system/WCFSetup.class.php')) {
	// try to unzip all setup files into temp folder
	$tar = new Tar(SETUP_FILE);
	$contentList = $tar->getContentList();
	if (empty($contentList)) {
		throw new SystemException("Can not unpack 'WCFSetup.tar.gz'. File is probably broken.");
	}
	
	foreach ($contentList as $file) {
		foreach ($neededFilesPattern as $pattern) {
			if (preg_match($pattern, $file['filename'])) {
				// create directory if not exists
Example #2
0
        header('Cache-Control: public, max-age=3600');
        readfile($directory . $_GET[$key]);
    }
    exit;
}
// show image from temp folder
if (isset($_GET['showImage'])) {
    readFileResource('showImage', TMP_DIR . 'install/files/acp/images/');
}
// show icon from temp folder
if (isset($_GET['showIcon'])) {
    readFileResource('showIcon', TMP_DIR . 'install/files/icon/');
}
// show css from temp folder
if (isset($_GET['showCSS'])) {
    readFileResource('showCSS', TMP_DIR . 'install/files/acp/style/setup/');
}
// check whether setup files are already unzipped
if (!file_exists(TMP_DIR . 'install/files/lib/system/WCFSetup.class.php')) {
    // try to unzip all setup files into temp folder
    $tar = new Tar(SETUP_FILE);
    $contentList = $tar->getContentList();
    if (!count($contentList)) {
        throw new SystemException("Can not unpack 'WCFSetup.tar.gz'. File is probably broken.");
    }
    foreach ($contentList as $file) {
        foreach ($neededFilesPattern as $pattern) {
            if (preg_match($pattern, $file['filename'])) {
                // create directory if not exists
                $dir = TMP_DIR . dirname($file['filename']);
                if (!@is_dir($dir)) {