update some source-code comments
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 8 Jun 2008 06:59:50 +0000 (08:59 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 17 Aug 2008 12:52:38 +0000 (14:52 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php

index cb1b09c3ab61df84b1da6b4e1f26557fd404eb6a..ee521c61a7c8f3c55b6d21212f1cf44e6fa9156e 100644 (file)
@@ -392,6 +392,11 @@ class PHPFSPOT {
       $this->avail_tags = Array();
       $count = 0;
    
+      /* if show_tags has been set in the configuration (only show photos
+         which are tagged by these tags) they following will take care,
+         that only these other tags are displayed where the photo is also
+         tagged with one of show_tags.
+      */
       if(isset($this->cfg->show_tags) && !empty($this->cfg->show_tags)) {
          $query_str="
             SELECT
@@ -459,6 +464,7 @@ class PHPFSPOT {
     */
    public function get_photo_details($idx)
    {
+      /* ~ F-Spot version 0.3.x */
       if($this->dbver < 9) {
          $query_str = "
             SELECT p.id, p.name, p.time, p.directory_path, p.description
@@ -481,8 +487,8 @@ class PHPFSPOT {
          }
       }
 
-      /* if show_tags is set, only return details for photos which
-         are specified to be shown
+      /* if show_tags is set, only return details of photos which are
+         tagged with a tag that has been specified to be shown.
       */
       if(isset($this->cfg->show_tags) && !empty($this->cfg->show_tags)) {
          $query_str.= "
@@ -503,6 +509,9 @@ class PHPFSPOT {
 
          $row = $this->db->db_fetch_object($result);
 
+         /* before F-Spot db version 9 there was no uri column but seperated
+            columns for directory_path and name (= filename).
+         */
          if($this->dbver < 9) {
             $row['uri'] = "file://". $row['directory_path'] ."/". $row['name'];
          }
@@ -518,9 +527,10 @@ class PHPFSPOT {
    /**
     * returns aligned photo names 
     *
-    * this function returns aligned (length) names for
-    * an specific photo. If the length of the name exceeds
-    * $limit the name will be shrinked (...)
+    * this function returns aligned (length) names for a specific photo.
+    * If the length of the name exceeds $limit the name will bei
+    * shrinked (...).
+    *
     * @param integer $idx
     * @param integer $limit
     * @return string|null
@@ -541,11 +551,11 @@ class PHPFSPOT {
    /**
     * get photo rating level
     *
-    * this function will return the integer-based rating
-    * level of the photo. This can only be done, if the F-Spot
-    * database is at a specific level. If rating value can not
-    * be found, zero will be returned indicating no rating value
-    * is available.
+    * this function will return the integer-based rating level of a
+    * photo. This can only be done, if the F-Spot database is at a
+    * specific version. If rating value can not be found, zero will
+    * be returned indicating no rating value is available.
+    *
     * @param integer idx
     * @return integer
     */
@@ -563,8 +573,8 @@ class PHPFSPOT {
    /**
     * get rate-search bars
     *
-    * this function will return the rating-bars for the
-    * search field.
+    * this function will return the rating-bars for the search field.
+    *
     * @return string
     */
    public function get_rate_search()
@@ -610,9 +620,9 @@ class PHPFSPOT {
    /**
     * shrink text according provided limit
     *
-    * If the length of the name exceeds $limit the
-    * text will be shortend and some content in between
-    * will be replaced with "..." 
+    * If the length of the name exceeds $limit, text will be shortend
+    * and inner content will be replaced with "...".
+    *
     * @param string $ext
     * @param integer $limit
     * @return string