summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php29
1 files changed, 23 insertions, 6 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 89f924d..a5b4a4d 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -703,8 +703,13 @@ class PHPFSPOT {
* @return string
*/
public function translate_path($path)
- {
- return str_replace($this->cfg->path_replace_from, $this->cfg->path_replace_to, $path);
+ {
+ if($this->cfg->enable_replace_path == true)
+ return str_replace(
+ $this->cfg->path_replace_from,
+ $this->cfg->path_replace_to, $path);
+
+ return $path;
} // translate_path
@@ -2544,6 +2549,13 @@ class PHPFSPOT {
$missing = true;
}
+ if($this->cfg->db_access == "pdo") {
+ if(array_search("sqlite", PDO::getAvailableDrivers()) === false) {
+ print "PDO SQLite3 driver is missing<br />\n";
+ $missing = true;
+ }
+ }
+
/* Check for HTML_AJAX PEAR package, lent from Horde project */
ini_set('track_errors', 1);
@include_once 'HTML/AJAX/Server.php';
@@ -3513,11 +3525,16 @@ class PHPFSPOT {
if(!isset($this->cfg->thumbs_per_page))
$this->_error("Please set \$thumbs_per_page in phpfspot_cfg");
- if(!isset($this->cfg->path_replace_from) || $this->cfg->path_replace_from == "")
- $this->_error("Please set \$path_replace_from in phpfspot_cfg");
+ if(!isset($this->cfg->enable_replace_path))
+ $this->_error("Please set \$enable_replace_path in phpfspot_cfg");
- if(!isset($this->cfg->path_replace_to) || $this->cfg->path_replace_to == "")
- $this->_error("Please set \$path_replace_to in phpfspot_cfg");
+ if($this->cfg->enable_replace_path == true) {
+ if(!isset($this->cfg->path_replace_from) || $this->cfg->path_replace_from == "")
+ $this->_error("Please set \$path_replace_from in phpfspot_cfg");
+
+ if(!isset($this->cfg->path_replace_to) || $this->cfg->path_replace_to == "")
+ $this->_error("Please set \$path_replace_to in phpfspot_cfg");
+ }
if(!isset($this->cfg->hide_tags))
$this->_error("Please set \$hide_tags in phpfspot_cfg");