summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/album.class.php2
-rw-r--r--lib/ui.lib.php3
-rw-r--r--modules/init.php9
-rw-r--r--modules/libglue/dbh.php2
-rw-r--r--modules/libglue/session.php7
-rw-r--r--templates/show_album.inc4
-rw-r--r--templates/show_artist.inc6
7 files changed, 20 insertions, 13 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index 12f0af24..5b56d90a 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -420,7 +420,7 @@ class Album {
/* Log this if we're doin debug */
if (conf('debug')) {
- log_event($GLOBALS['user']->username,'amazon-xml',"Searched using $search_term with " . conf('amazon_developer_key') . " as key " . count($final_results) . " results found");
+ log_event($GLOBALS['user']->username,'amazon-xml',"Searched using $keywords with " . conf('amazon_developer_key') . " as key " . count($final_results) . " results found");
}
} // if no cover
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 1f1665d6..77693a05 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -986,7 +986,8 @@ function get_location() {
}
/* Sanatize the $_SERVER['PHP_SELF'] variable */
- $location['page'] = preg_replace("/^\/(.+\.php)\/?.*/","$1",$source);
+ $source = str_replace(conf('raw_web_path'),"",$source);
+ $location['page'] = preg_replace("/^\/(.+\.php)\/?.*/","$1",$source);
switch ($location['page']) {
case 'index.php':
diff --git a/modules/init.php b/modules/init.php
index 66927a5a..fa57c29e 100644
--- a/modules/init.php
+++ b/modules/init.php
@@ -37,7 +37,6 @@ $prefix = realpath($ampache_path . "/../");
$configfile = "$prefix/config/ampache.cfg.php";
require_once($prefix . "/lib/general.lib.php");
-
/*********************STOP EDITING*********************************/
/*
@@ -82,6 +81,7 @@ if (!$results['conf']['allow_stream_playback']) {
$results['conf']['allow_stream_playback'] = "true";
}
+$results['conf']['raw_web_path'] = $results['conf']['web_path'];
$results['conf']['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['conf']['web_path'];
$results['conf']['version'] = '3.3.2-Beta1 (Build 001)';
$results['conf']['catalog_file_pattern']= 'mp3|mpc|m4p|m4a|mp4|aac|ogg|rm|wma|asf|flac|spx';
@@ -208,15 +208,16 @@ require_once(conf('prefix') . "/lib/class/access.class.php");
require_once(conf('prefix') . "/lib/class/error.class.php");
require_once(conf('prefix') . "/lib/class/genre.class.php");
+
+/* Set a new Error Handler */
+$old_error_handler = set_error_handler("ampache_error_handler");
+
/* Some Libglue Hacks */
$array['dbh_name'] = 'stupid_pos';
$array['stupid_pos'] = check_sess_db('local');
libglue_param($array);
/* End Libglue Hacks */
-/* Set a new Error Handler */
-$old_error_handler = set_error_handler("ampache_error_handler");
-
/* Check their PHP Vars to make sure we're cool here */
diff --git a/modules/libglue/dbh.php b/modules/libglue/dbh.php
index ca00d0a1..92824efc 100644
--- a/modules/libglue/dbh.php
+++ b/modules/libglue/dbh.php
@@ -27,7 +27,7 @@
function setup_sess_db($name, $host, $db, $username, $password)
{
- $dbh = @mysql_connect($host, $username, $password) or header("Location:" . conf('web_path') . "/test.php");
+ $dbh = mysql_connect($host, $username, $password) or header("Location:" . conf('web_path') . "/test.php");
if ( !is_resource($dbh) )
{
echo "Unable to connect to \"". $host ."\" in order to \n" .
diff --git a/modules/libglue/session.php b/modules/libglue/session.php
index b0534844..9aa7c70b 100644
--- a/modules/libglue/session.php
+++ b/modules/libglue/session.php
@@ -14,10 +14,9 @@
*/
-function check_sess_db($dbtype = 'local')
-{
- if($dbtype === 'sso')
- {
+function check_sess_db($dbtype = 'local') {
+
+ if($dbtype === 'sso') {
$dbh = libglue_param(libglue_param('sso_dbh_name'));
if(is_resource($dbh)) return $dbh;
$dbh_name = libglue_param('sso_dbh_name');
diff --git a/templates/show_album.inc b/templates/show_album.inc
index d16a9cf3..6a466aab 100644
--- a/templates/show_album.inc
+++ b/templates/show_album.inc
@@ -58,8 +58,8 @@ $username=$user->username;
<td valign="top">
<?php
if (conf('ratings')) {
- show_rating($album->id,'artist');
- } // end if flash
+ show_rating($album->id,'album');
+ } // end if ratings
echo "<br />\n";
?>
<b>Actions:</b><br />
diff --git a/templates/show_artist.inc b/templates/show_artist.inc
index bb3f6f51..8e125740 100644
--- a/templates/show_artist.inc
+++ b/templates/show_artist.inc
@@ -31,6 +31,12 @@ $web_path = conf('web_path');
<td>
<span class="header1"><?php print _("Albums by") . " " . $artist->full_name; ?></span>
<ul>
+ <?php
+ if (conf('ratings')) {
+ show_rating($artist->id,'artist');
+ } // end if ratings
+ echo "<br />\n";
+ ?>
<li><a href="<?php print $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php print $artist_id; ?>"><?php print _("Show All Songs By") . " " . $artist->full_name; ?></a></li>
<li><a href="<?php print $web_path; ?>/song.php?action=m3u&amp;artist=<?php print $artist_id; ?>"><?php print _("Play All Songs By") . " " . $artist->full_name; ?></a></li>
<li><a href="<?php print $web_path; ?>/song.php?action=m3u&amp;artist_random=<?php print $artist_id; ?>"><?php print _("Play Random Songs By") . " " . $artist->full_name; ?></a></li>