elFinder.class.php.diff

Alexey Sukhotin, 21.11.2010 16:10

Download (1.1 kB)

 
elFinder.class.php 2010-11-21 15:51:00.000000000 +0300
269 269
		}
270 270
		$this->_today = mktime(0,0,0, date('m'), date('d'), date('Y'));
271 271
		$this->_yesterday = $this->_today-86400;
272

  
273
    // load additional mime types
274
    $mimecf = file(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'mime.types');
275

  
276
    foreach ($mimecf as $line_num => $line) {
277
      if (!preg_match('/^\s*#/', $line)) {
278
        $mime = preg_split('/\s+/', $line, -1, PREG_SPLIT_NO_EMPTY);
279

  
280
        $arrsize = count($mime);
281

  
282
        if ($arrsize > 1) {
283
          for ($i = 1 ; $i < $arrsize ; $i++) {
284
            $this->_mimeTypes[$mime[$i]] = $mime[0];
285
          }
286
        }
287
      }
288
    }
272 289
	}
273 290

  
274 291
	/**
......
1328 1345
	 * @param  string  $path  file path
1329 1346
	 * @return string
1330 1347
	 **/
1331
	private function _mimetype($path)
1348
	public function _mimetype($path)
1332 1349
	{
1333 1350
		if (empty($this->_options['mimeDetect']) || $this->_options['mimeDetect'] == 'auto') {
1334 1351
			$this->_options['mimeDetect'] = $this->_getMimeDetect();