summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/flag.class.php24
-rw-r--r--templates/show_flagged.inc.php10
2 files changed, 26 insertions, 8 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()
/**
diff --git a/templates/show_flagged.inc.php b/templates/show_flagged.inc.php
index 358ca3dd..5a6dec51 100644
--- a/templates/show_flagged.inc.php
+++ b/templates/show_flagged.inc.php
@@ -28,6 +28,7 @@ $web_path = conf('web_path');
<th><?php echo _('Object'); ?></th>
<th><?php echo _('User'); ?></th>
<th><?php echo _('Flag'); ?></th>
+ <th><?php echo _('Comment'); ?></th>
<th><?php echo _('Status'); ?></th>
<th><?php echo _('Action'); ?></th>
</tr>
@@ -36,9 +37,10 @@ $web_path = conf('web_path');
<td align="center">
<input type="checkbox" name="song[]" value="<?php echo $flag->id; ?>" id="song_<?php echo $flag->id; ?>" />
</td>
- <td><?php $flag->print_name(); ?></td>
- <td><?php echo scrub_out($flag->user); ?></td>
+ <td><a href="<?php echo conf('web_path'); ?>/admin/flag.php?action=show_edit_song&song=<?php echo $flag->object_id; ?>"><?php $flag->print_name(); ?></a></td>
+ <td><?php echo scrub_out($flag->f_user_username); ?></td>
<td><?php $flag->print_flag(); ?></td>
+ <td><?php echo scrub_out($flag->comment); ?></td>
<td><?php $flag->print_status(); ?></td>
<td align="center">
<?php if ($flag->approved) { ?>
@@ -54,11 +56,11 @@ $web_path = conf('web_path');
</tr>
<?php } if (!count($flagged)) { ?>
<tr class="<?php echo flip_class(); ?>">
- <td colspan="6" class="error"><?php echo _('No Records Found'); ?></td>
+ <td colspan="7" class="error"><?php echo _('No Records Found'); ?></td>
</tr>
<?php } ?>
<tr class="<?php echo flip_class(); ?>">
- <td colspan="6">
+ <td colspan="7">
<select name="update_action">
<option value="reject"><?php echo _('Reject'); ?></option>
<option value="approve"><?php echo _('Approve'); ?></option>