summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php40
1 files changed, 25 insertions, 15 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 303c355..39bace3 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -391,6 +391,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
@@ -458,6 +463,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
@@ -480,8 +486,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.= "
@@ -502,6 +508,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'];
}
@@ -517,9 +526,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
@@ -540,11 +550,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
*/
@@ -562,8 +572,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()
@@ -609,9 +619,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