issue78, move version information to main class
[phpfspot.git] / phpfspot.class.php
index 50ab45e139423f31c34f08d6c414af13062ac91c..6c150fa6c70ca9c97862ffb9c6d0a49ef55b1b23 100644 (file)
@@ -42,13 +42,17 @@ class PHPFSPOT {
     */
    public function __construct()
    {
     */
    public function __construct()
    {
+      $this->cfg = new PHPFSPOT_CFG;
+
+      /* set application name and version information */
+      $this->cfg->product = "phpfspot";
+      $this->cfg->version = "1.1";
+
       /* Check necessary requirements */
       if(!$this->checkRequirements()) {
          exit(1);
       }
 
       /* Check necessary requirements */
       if(!$this->checkRequirements()) {
          exit(1);
       }
 
-      $this->cfg = new PHPFSPOT_CFG;
-
       $this->db  = new PHPFSPOT_DB($this, $this->cfg->fspot_db);
       
       if(!is_writeable(dirname($this->cfg->phpfspot_db))) {
       $this->db  = new PHPFSPOT_DB($this, $this->cfg->fspot_db);
       
       if(!is_writeable(dirname($this->cfg->phpfspot_db))) {
@@ -1166,7 +1170,7 @@ class PHPFSPOT {
       foreach($resolutions as $resolution) {
 
          $thumb_sub_path = substr($file_md5, 0, 2);
       foreach($resolutions as $resolution) {
 
          $thumb_sub_path = substr($file_md5, 0, 2);
-         $thumb_path = $this->cfg->base_path ."/thumbs/". $thumb_sub_path ."/". $resolution ."_". $file_md5;
+         $thumb_path = $this->cfg->thumb_path ."/". $thumb_sub_path ."/". $resolution ."_". $file_md5;
 
          if(!file_exists(dirname($thumb_path))) {
             mkdir(dirname($thumb_path), 0755);
 
          if(!file_exists(dirname($thumb_path))) {
             mkdir(dirname($thumb_path), 0755);
@@ -1674,7 +1678,7 @@ class PHPFSPOT {
    <description>
     <?php print $thumb_html; ?> 
    </description>
    <description>
     <?php print $thumb_html; ?> 
    </description>
-   <pubDate><?php print strftime("%a, %d %b %Y %T %z"); ?></pubDate>
+   <pubDate><?php print strftime("%a, %d %b %Y %T %z", $meta_date); ?></pubDate>
   </item>
 <?php
 
   </item>
 <?php
 
@@ -1910,8 +1914,8 @@ class PHPFSPOT {
    public function get_thumb_path($width, $photo)
    {
       $sub_path = substr($this->getMD5($photo), 0, 2);
    public function get_thumb_path($width, $photo)
    {
       $sub_path = substr($this->getMD5($photo), 0, 2);
-      return $this->cfg->base_path
-         . "/thumbs/"
+      return $this->cfg->thumb_path
+         . "/"
          . $sub_path
          . "/"
          . $width
          . $sub_path
          . "/"
          . $width