summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/catalog.class.php7
-rw-r--r--lib/search.php6
3 files changed, 10 insertions, 5 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index e4a94d8e..858dce5d 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.3
+ - Fixed comment searching, broken when split out into its own
+ table
- Fixed a issue with Catalog builds in Windows
- Fixed a bug with admins ability to set the preferences of a
specific user
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 301605c4..0e41f479 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -408,7 +408,7 @@ class Catalog {
else {
// not readable, warn user
debug_event('read',"$full_file is not readable by ampache",'2','ampache-catalog');
- echo "$full_file " . _("is not readable by ampache") . ".<br />\n";
+ echo "$full_file " . _('is not readable by ampache') . ".<br />\n";
}
@@ -885,15 +885,16 @@ class Catalog {
$info = $this->update_song_from_tags($song);
if ($info['change']) {
+ $file = scrub_out($song->file);
echo "<dl>\n\t<dd>";
- echo "<b>$song->file " . _("Updated") . "</b>\n";
+ echo "<b>$file " . _('Updated') . "</b>\n";
echo $info['text'];
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
flush();
} // if change
else {
echo"<dl>\n\t<dd>";
- echo "<b>$song->file</b><br />" . _("No Update Needed") . "\n";
+ echo "<b>$song->file</b><br />" . _('No Update Needed') . "\n";
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
flush();
}
diff --git a/lib/search.php b/lib/search.php
index 3c6c6b42..99897ec7 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -166,7 +166,9 @@ function search_song($data,$operator,$method,$limit) {
$where_sql .= " song.file $value_string $operator";
break;
case 'comment':
- $where_sql .= " song.comment $value_string $operator";
+ $join_sql .= 'song.id=song_ext_data.song_id AND ';
+ $table_sql .= 'song_ext_data,';
+ $where_sql .= " song_ext_data.comment $value_string $operator";
break;
case 'played':
/* This is a 0/1 value so bool it */
@@ -203,7 +205,7 @@ function search_song($data,$operator,$method,$limit) {
$base_sql = "SELECT DISTINCT(song.id) $select_sql FROM song";
- $sql = $base_sql . $table_sql . " WHERE " . $join_sql . "(" . $where_sql . ")" . $group_sql . $limit_sql;
+ $sql = $base_sql . $table_sql . " WHERE " . $join_sql . " (" . $where_sql . ")" . $group_sql . $limit_sql;
/**
* Because we might need this for Dynamic Playlist Action