summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/class/album.class.php4
-rw-r--r--lib/class/artist.class.php2
-rw-r--r--lib/class/dba.class.php12
-rw-r--r--lib/class/song.class.php6
4 files changed, 17 insertions, 7 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index c74bd800..1fae7fd0 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) 2001 - 2008 Ampache.org
All Rights Reserved
This program is free software; you can redistribute it and/or
@@ -222,7 +222,7 @@ class Album {
$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_artist')));
- $this->f_artist_link = "<a href=\"$web_path/artists.php?action=show&amp;artist=" . $this->artist_id . "\">" . $artist . "</a>";
+ $this->f_artist_link = "<a href=\"$web_path/artists.php?action=show&amp;artist=" . $this->artist_id . "\" title=\"" . scrub_out($this->artist_name) . "\">" . $artist . "</a>";
$this->f_artist = $artist;
}
else {
diff --git a/lib/class/artist.class.php b/lib/class/artist.class.php
index 70af97e2..057ec549 100644
--- a/lib/class/artist.class.php
+++ b/lib/class/artist.class.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) 2001 - 2008 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/lib/class/dba.class.php b/lib/class/dba.class.php
index 3a348a46..71e6b6c8 100644
--- a/lib/class/dba.class.php
+++ b/lib/class/dba.class.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) 2001 - 2008 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -164,6 +164,16 @@ class Dba {
$dbh = mysql_connect($hostname,$username,$password);
if (!$dbh) { debug_event('Database','Error unable to connect to database' . mysql_error(),'1'); }
+ if (function_exists('mysql_set_charset')) {
+ $sql_charset = str_replace("-","",Config::get('site_charset'));
+ $charset = mysql_set_charset($sql_charset,$dbh);
+ }
+ else {
+ $sql = "SET NAMES " . mysql_real_escape_string(str_replace("-","",Config::get('site_charset')));
+ $charset = mysql_query($sql,$dbh);
+ }
+ if (!$charset) { debug_event('Database','Error unable to set connection charset, function missing or set failed','1'); }
+
$select_db = mysql_select_db($database,$dbh);
if (!$select_db) { debug_event('Database','Error unable to select ' . $database . ' error ' . mysql_error(),'1'); }
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 012aac38..f53e39f6 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -695,9 +695,9 @@ class Song {
$this->f_title = truncate_with_ellipsis($this->title,Config::get('ellipse_threshold_title'));
// Create Links for the different objects
- $this->f_link = "<a href=\"" . Config::get('web_path') . "/song.php?action=show_song&amp;song_id=" . $this->id . "\"> " . scrub_out($this->f_title) . "</a>";
- $this->f_album_link = "<a href=\"" . Config::get('web_path') . "/albums.php?action=show&amp;album=" . $this->album . "\"> " . scrub_out($this->f_album) . "</a>";
- $this->f_artist_link = "<a href=\"" . Config::get('web_path') . "/artists.php?action=show&amp;artist=" . $this->artist . "\"> " . scrub_out($this->f_artist) . "</a>";
+ $this->f_link = "<a href=\"" . Config::get('web_path') . "/song.php?action=show_song&amp;song_id=" . $this->id . "\" title=\"" . scrub_out($this->title) . "\"> " . scrub_out($this->f_title) . "</a>";
+ $this->f_album_link = "<a href=\"" . Config::get('web_path') . "/albums.php?action=show&amp;album=" . $this->album . "\" title=\"" . scrub_out($this->f_album_full) . "\"> " . scrub_out($this->f_album) . "</a>";
+ $this->f_artist_link = "<a href=\"" . Config::get('web_path') . "/artists.php?action=show&amp;artist=" . $this->artist . "\" title=\"" . scrub_out($this->f_artist_full) . "\"> " . scrub_out($this->f_artist) . "</a>";
// Format the Bitrate
$this->f_bitrate = intval($this->bitrate/1000) . "-" . strtoupper($this->mode);