summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-06 20:17:21 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-06 20:17:21 +0000
commit22beb1a65d65c9c61fb5d7e181df681fb1a8849e (patch)
treefcc595461f72ca424bbe2cea557b574849c1c997 /lib
parent1d12186dba5259dfcf2d0306bb3e34d84dda5304 (diff)
downloadampache-22beb1a65d65c9c61fb5d7e181df681fb1a8849e.tar.gz
ampache-22beb1a65d65c9c61fb5d7e181df681fb1a8849e.tar.bz2
ampache-22beb1a65d65c9c61fb5d7e181df681fb1a8849e.zip
added paging to genre sub views, and added missing fields to the song single view
Diffstat (limited to 'lib')
-rw-r--r--lib/class/album.class.php7
-rw-r--r--lib/class/song.class.php2
-rw-r--r--lib/class/update.class.php32
3 files changed, 39 insertions, 2 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index d0beedce..ca6f1b10 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -211,14 +211,14 @@ class Album {
/* Truncate the string if it's to long */
$this->f_name = truncate_with_ellipsis($this->full_name,Config::get('ellipsis_threshold_album'));
- $this->f_name_link = "<a href=\"$web_path/albums.php?action=show&amp;album=" . scrub_out($this->id) . "\" title=\"" . scrub_out($this->full_name) . "\">" . $this->f_name;
+ $this->f_name_link = "<a href=\"$web_path/albums.php?action=show&amp;album=" . scrub_out($this->id) . "\" title=\"" . scrub_out($this->full_name) . "\">" . $this->f_name;
// If we've got a disk append it
if ($this->disk) {
$this->f_name_link .= " <span class=\"discnb disc" .$this->disk. "\">[" . _('Disk') . " " . $this->disk . "]</span>";
}
$this->f_name_link .="</a>";
- $this->f_link = $this->f_name_link;
+ $this->f_link = $this->f_name_link;
$this->f_title = $full_name;
if ($this->artist_count == '1') {
$artist = scrub_out(truncate_with_ellipsis(trim($this->artist_prefix . ' ' . $this->artist_name),Config::get('ellipsis_threshold_album')));
@@ -234,6 +234,9 @@ class Album {
$this->year = "N/A";
}
+ // Format the artist name to include the prefix
+ $this->f_artist_name = trim($this->artist_prefix . ' ' . $this->artist_name);
+
} // format
/**
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 8cc89308..b7c59621 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -661,6 +661,8 @@ class Song {
*/
function format() {
+ $this->fill_ext_info();
+
// Format the filename
preg_match("/^.*\/(.*?)$/",$this->file, $short);
$this->f_file = htmlspecialchars($short[1]);
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 6f36a107..0d5bacfe 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -247,6 +247,11 @@ class Update {
$version[] = array('version' => '340012','description'=>$update_string);
+ $update_string = '- Removed Unused Preferneces<br />' .
+ '- Changed all XML-RPC acls to RPC to reflect inclusion of new API<br />';
+
+// $version[] = array('version' => '340013','description'=>$update_string)
+
return $version;
} // populate_version
@@ -1042,5 +1047,32 @@ class Update {
} // update_340012
+ /**
+ * update_340013
+ * This update removes a whole bunch of preferences that are no longer
+ * being used in any way, and changes the ACL XML-RPC to just RPC
+ */
+ public static function update_340013() {
+
+ $sql = "DELETE FROM `preference` WHERE `name`='localplay_mpd_hostname' OR `name`='localplay_mpd_port' " .
+ "OR `name`='direct_link' OR `name`='localplay_level' OR `name`='localplay_mpd_password'";
+ $db_results = Dba::query($sql);
+
+ $sql = "UPDATE `access_list` SET `type`='rpc' WHERE `type`='xml-rpc'";
+ $db_results = Dba::query($sql);
+
+ $sql = "SELECT `id` FROM `user`";
+ $db_results = Dba::query($sql);
+
+ User::fix_preferences('-1');
+
+ while ($r = Dba::fetch_assoc($db_results)) {
+ User::fix_preferences($r['id']);
+ } // while we're fixing the useres stuff
+
+ self::set_version('db_version','340013');
+
+ } // update_340013
+
} // end update class
?>