summaryrefslogtreecommitdiffstats
path: root/lib/class/flag.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-03-27 07:59:33 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-03-27 07:59:33 +0000
commit664bd9a28aa10eedee3deb82cda9b99b91b51fa0 (patch)
tree7ab60c5a038ccde3aa24f9fa18fd71bc6a2b515b /lib/class/flag.class.php
parentdcb93abc50ddea7da48f104ad3b861dee342d623 (diff)
downloadampache-664bd9a28aa10eedee3deb82cda9b99b91b51fa0.tar.gz
ampache-664bd9a28aa10eedee3deb82cda9b99b91b51fa0.tar.bz2
ampache-664bd9a28aa10eedee3deb82cda9b99b91b51fa0.zip
I am not proud... but it works
Diffstat (limited to 'lib/class/flag.class.php')
-rw-r--r--lib/class/flag.class.php26
1 files changed, 21 insertions, 5 deletions
diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php
index dc6f44a3..a95e73c8 100644
--- a/lib/class/flag.class.php
+++ b/lib/class/flag.class.php
@@ -36,6 +36,10 @@ class Flag {
var $date;
var $approved=0;
+ /* Generated Values */
+ var $name; // Blank
+ var $title; // Blank
+
/**
* Constructor
* This takes a flagged.id and then pulls in the information for said flag entry
@@ -190,11 +194,10 @@ class Flag {
} // approve
/**
- * print_name
- * This function formats and prints out a userfriendly name of the flagged
- * object
+ * format_name
+ * This function formats and sets the $this->name variable and $this->title
*/
- function print_name() {
+ function format_name() {
switch ($this->object_type) {
case 'song':
@@ -208,7 +211,20 @@ class Flag {
break;
} // end switch on object type
- echo "<span title=\"$title\">$name</span>";
+ $this->title = $title;
+ $this->name = $name;
+
+ } // format_name()
+
+ /**
+ * print_name
+ * This function formats and prints out a userfriendly name of the flagged
+ * object
+ */
+ function print_name() {
+
+ $this->format_name();
+ echo "<span title=\"" . $this->title . "\">" . $this->name . "</span>";
} // print_name