/** * Configure after successfull mount. * * @return void * @author Dmitry (dio) Levashov **/ protected function configure() { $this->aroot = realpath($this->root); $root = $this->stat($this->root); if ($this->options['quarantine']) { $this->attributes[] = array('pattern' => '~^' . preg_quote($this->separator . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true); } // check thumbnails path if ($this->options['tmbPath'] && ($test_path = $this->_separator($this->options['tmbPath'])) && strpos($test_path, $this->separator) === false) { $this->options['tmbPath'] = $this->_joinPath($this->root, $this->options['tmbPath']); $this->options['tmbPath'] = $this->_normpath($this->options['tmbPath']); } parent::configure(); // if no thumbnails url - try detect it if ($root['read'] && !$this->tmbURL && $this->URL) { if ($this->inRoot($this->tmbPath)) { $temp = substr($this->tmbPath, strlen($this->root) + 1); $this->tmbURL = $this->URL . str_replace($this->separator, '/', $temp); if (preg_match("|[^/?&=]\$|", $this->tmbURL)) { $this->tmbURL .= '/'; } } } // check quarantine dir if (!empty($this->options['quarantine'])) { $this->quarantine = $this->_joinPath($this->root, $this->options['quarantine']); if (!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine']) || !is_writable($this->quarantine)) { $this->archivers['extract'] = array(); $this->disabled[] = 'extract'; } } else { $this->archivers['extract'] = array(); $this->disabled[] = 'extract'; } }
/** * Configure after successfull mount. * * @return void * @author Dmitry (dio) Levashov **/ protected function configure() { parent::configure(); if (!empty($this->options['tmpPath'])) { if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'])) && is_writable($this->options['tmpPath'])) { $this->tmp = $this->options['tmpPath']; } } if (!$this->tmp && $this->tmbPath) { $this->tmp = $this->tmbPath; } }
/** * Set tmp path * * @return void * @author Dmitry (dio) Levashov **/ protected function configure() { parent::configure(); }