private function getTempPath()
 {
     $this->setForceCompile(true);
     $this->setCaching(Smarty::CACHING_OFF);
     require_once 'includes/libs/wcf/BasicFileUtil.class.php';
     return BasicFileUtil::getTempFolder();
 }
Example #2
0
 /**
  * Calls all init functions of the WCF class. 
  */
 public function __construct()
 {
     if (!defined('TMP_DIR')) {
         define('TMP_DIR', BasicFileUtil::getTempFolder());
     }
     $this->initBenchmark();
     $this->initMagicQuotes();
     $this->initDB();
     $this->initOptions();
     $this->initCache();
     $this->initSession();
     $this->initLanguage();
     $this->initTPL();
     $this->initBlacklist();
 }
Example #3
0
 private static function getTempPath()
 {
     require_once 'includes/libs/wcf/BasicFileUtil.class.php';
     return BasicFileUtil::getTempFolder();
 }
Example #4
0
		return $eof - $correction;
	}
}

// let's go
// get temp file prefix
if (isset($_REQUEST['tmpFilePrefix'])) {
	$prefix = preg_replace('/[^a-f0-9_]+/', '', $_REQUEST['tmpFilePrefix']);
}
else {
	$prefix = substr(sha1(uniqid(microtime())), 0, 8);
}
define('TMP_FILE_PREFIX', $prefix);

// try to find the temp folder
define('TMP_DIR', BasicFileUtil::getTempFolder());

/**
 * Reads a file resource from temp folder.
 * 
 * @param	string		$key
 * @param	string		$directory
 */
function readFileResource($key, $directory) {
	if (preg_match('~[\w\-]+\.(css|jpg|png|svg|eot|woff|ttf)~', $_GET[$key], $match)) {
		switch ($match[1]) {
			case 'css':
				header('Content-Type: text/css');
			break;
			
			case 'jpg':
Example #5
0
 private function getTempPath()
 {
     $this->force_compile = true;
     require_once 'includes/libs/wcf/BasicFileUtil.class.php';
     return BasicFileUtil::getTempFolder();
 }
Example #6
0
 public function getTempPath()
 {
     $this->force_compile = true;
     include 'includes/libs/wcf/BasicFileUtil.class.php';
     return BasicFileUtil::getTempFolder();
 }