fix spelling in welcome.tpl
[phpfspot.git] / phpfspot.class.php
index be752eedda5fbd7368de4f6d5a08535a2790c3b2..d192d0d6445acee4f4a5f3ab69d03ca73e215329 100644 (file)
@@ -2,8 +2,9 @@
 
 /***************************************************************************
  *
- * Copyright (c) by Andreas Unterkircher, unki@netshadow.at
- * All rights reserved
+ * phpfspot, presents your F-Spot photo collection in Web browsers.
+ *
+ * Copyright (c) by Andreas Unterkircher
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -483,8 +484,11 @@ class PHPFSPOT {
          $thumb_path = $this->get_thumb_path($this->cfg->photo_width, $photo);
       }
 
+      /* get mime-type, height and width from the original photo */
+      $info = getimagesize($orig_path);
+
       /* get EXIF information if JPEG */
-      if($details['mime'] == "image/jpeg") {
+      if($info['mime'] == "image/jpeg") {
          $meta = $this->get_meta_informations($orig_path);
       }
 
@@ -492,7 +496,6 @@ class PHPFSPOT {
       if(isset($meta['ExifImageWidth'])) {
          $meta_res = $meta['ExifImageWidth'] ."x". $meta['ExifImageLength'];
       } else {
-         $info = getimagesize($orig_path);
          $meta_res = $info[0] ."x". $info[1]; 
       }
 
@@ -516,13 +519,13 @@ class PHPFSPOT {
          return;
       }
 
-      $info = getimagesize($thumb_path);
+      $info_thumb = getimagesize($thumb_path);
 
       $this->tmpl->assign('description', $details['description']);
       $this->tmpl->assign('image_name', $this->parse_uri($details['uri'], 'filename'));
 
-      $this->tmpl->assign('width', $info[0]);
-      $this->tmpl->assign('height', $info[1]);
+      $this->tmpl->assign('width', $info_thumb[0]);
+      $this->tmpl->assign('height', $info_thumb[1]);
       $this->tmpl->assign('ExifMadeOn', $meta_date);
       $this->tmpl->assign('ExifMadeWith', $meta_make);
       $this->tmpl->assign('ExifOrigResolution', $meta_res);
@@ -546,6 +549,7 @@ class PHPFSPOT {
          $this->tmpl->assign('next_img', $next_img);
       }
       $this->tmpl->assign('mini_width', $this->cfg->mini_width);
+      $this->tmpl->assign('photo_width', $this->cfg->photo_width);
       $this->tmpl->assign('photo_number', $i);
       $this->tmpl->assign('photo_count', count($all_photos));