summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpb1dft <pb1dft@ampache>2007-02-19 21:07:36 +0000
committerpb1dft <pb1dft@ampache>2007-02-19 21:07:36 +0000
commitd84f889c9c5940b5c734194b0ac28ad49ecd941d (patch)
tree323b0044a841e1677607698342ac92079c172a52 /lib
parentce617e69811065253acdb2cc4009d9ee2280d804 (diff)
downloadampache-d84f889c9c5940b5c734194b0ac28ad49ecd941d.tar.gz
ampache-d84f889c9c5940b5c734194b0ac28ad49ecd941d.tar.bz2
ampache-d84f889c9c5940b5c734194b0ac28ad49ecd941d.zip
Some minor flag mods; show username instead of id,show comment on last then flagged, made album in flagged clickable
Diffstat (limited to 'lib')
-rw-r--r--lib/class/flag.class.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php
index fa7aa382..20ed5d8b 100644
--- a/lib/class/flag.class.php
+++ b/lib/class/flag.class.php
@@ -59,7 +59,9 @@ class Flag {
$this->flag = $info['flag'];
$this->date = $info['date'];
$this->approved = $info['approved'];
-
+ $f_user = $this->format_user();
+ $this->f_user_fullname = $f_user['fullname'];
+ $this->f_user_username = $f_user['username'];
return true;
} // flag
@@ -76,7 +78,7 @@ class Flag {
$db_results = mysql_query($sql, dbh());
$results = mysql_fetch_assoc($db_results);
-
+
return $results;
} // _get_info
@@ -217,6 +219,21 @@ class Flag {
return true;
} // approve
+
+ /**
+ * format_user
+ * This formats username etc
+ */
+ function format_user() {
+
+ $sql = "SELECT * FROM user WHERE id = '$this->user'";
+ $db_results = mysql_query($sql, dbh());
+
+ $f_user = mysql_fetch_assoc($db_results);
+
+ return $f_user;
+
+ } // format_user
/**
* format_name
@@ -235,10 +252,9 @@ class Flag {
break;
} // end switch on object type
-
+
$this->title = $title;
$this->name = $name;
-
} // format_name()
/**