translate_path() only needs one parameters. remove unused second one
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 12 Apr 2008 10:28:49 +0000 (12:28 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 12 Apr 2008 10:58:37 +0000 (12:58 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php
phpfspot_img.php

index 12e14fa42f1ef3922d57d0faf75699651081e9a4..b8f45a898e2bdb5a10264226fe8f15e59e362e03 100644 (file)
@@ -488,10 +488,9 @@ class PHPFSPOT {
     * is usally not the same as on the webserver, this function
     * will replace the path with that one specified in the cfg
     * @param string $path
-    * @param integer $width
     * @return string
     */
-   public function translate_path($path, $width = 0)
+   public function translate_path($path)
    {  
       return str_replace($this->cfg->path_replace_from, $this->cfg->path_replace_to, $path);
 
@@ -541,7 +540,7 @@ class PHPFSPOT {
          return;
       }
 
-      $orig_path = $this->translate_path($this->parse_uri($details['uri'], 'fullpath'));
+      $orig_path = $this->translate_path($this->parse_uri($details['uri']));
       $thumb_path = $this->get_thumb_path($this->cfg->photo_width, $photo);
 
       if(!file_exists($orig_path)) {
@@ -1555,7 +1554,7 @@ class PHPFSPOT {
       $details = $this->get_photo_details($idx);
 
       /* calculate file MD5 sum */
-      $full_path = $this->translate_path($this->parse_uri($details['uri'], 'fullpath'));
+      $full_path = $this->translate_path($this->parse_uri($details['uri']));
 
       if(!file_exists($full_path)) {
          $this->_error("File ". $full_path ." does not exist\n");
@@ -2200,7 +2199,7 @@ class PHPFSPOT {
 <br>
 ". $details['description']);
 
-         $orig_path = $this->translate_path($this->parse_uri($details['uri'], 'fullpath'));
+         $orig_path = $this->translate_path($this->parse_uri($details['uri']));
 
          /* get EXIF information if JPEG */
          if($details['mime'] == "image/jpeg") {
index f298b009bfd3366b6535c2efcd57a001f1774ab4..461f5c61a253083db259baca67b330007b1e0668 100644 (file)
@@ -79,7 +79,7 @@ class PHPFSPOT_IMG {
 
       /* no width specified - show photo in its original size */
       if($width == 0) {
-         $fullpath = $this->parent->translate_path($this->parent->parse_uri($details['uri'], 'fullpath'));
+         $fullpath = $this->parent->translate_path($this->parent->parse_uri($details['uri']));
       }
       /* show thumbnail */
       else {