summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/song.class.php5
-rw-r--r--lib/class/update.class.php41
-rw-r--r--modules/init.php2
4 files changed, 43 insertions, 7 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 46b5324a..55f8dde2 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.2-Beta2
+ - Removed old flagging tables and added a new one as part of
+ full flagging rewrite.
- Fixed play selected on playlists, it no longer always plays
everything.
- Fixed redirection after applying a rating to an album
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 35fca013..910aa1e7 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -107,9 +107,8 @@ class Song {
/* Grab the basic information from the catalog and return it */
$sql = "SELECT song.id,file,catalog,album,song.comment,year,artist,".
"title,bitrate,rate,mode,size,time,track,genre,played,song.enabled,update_time,".
- "addition_time,flagged.id as flagid,flagged.user as flaguser,flagged.type ".
- "as flagtype,flagged.date as flagdate,flagged.comment as flagcomment FROM ".
- "song LEFT JOIN flagged ON song.id = flagged.song WHERE song.id = '" . sql_escape($this->id) . "'";
+ "addition_time FROM song WHERE song.id = '" . sql_escape($this->id) . "'";
+
$db_results = mysql_query($sql, dbh());
$results = mysql_fetch_object($db_results);
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 597a37cf..c27661fc 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -143,7 +143,6 @@ class Update {
} // need_update
-
/*!
@function populate_version
@discussion just sets an array the current differences
@@ -255,14 +254,19 @@ class Update {
$version[] = array('version' => '332005','description' => $update_string);
- $update_string = '- Adds Create Date to User table to track registration and user creation time.';
+ $update_string = '- Adds Create Date to User table to track registration and user creation time.<br />';
$version[] = array('version' => '332006','description' => $update_string);
- $update_string = '- Alters the Dynamic Song field to be TEXT instead of Varchar (varchar was not long enough).';
+ $update_string = '- Alters the Dynamic Song field to be TEXT instead of Varchar (varchar was not long enough).<br />';
$version[] = array('version' => '332007','description' => $update_string);
+ $update_string = '- Drop All 3 Flagging Tables and recreate the Flagged table, this will remove all previous flagging records.<br />' .
+ '&nbsp;&nbsp;&nbsp; the code has changed enough to make it useless to migrate old data.<br />';
+
+ $version[] = array('version' => '332008','description' => $update_string);
+
return $version;
} // populate_version
@@ -1404,5 +1408,36 @@ class Update {
} // update_332007
+ /**
+ * update_332008
+ * Re-combobulating Flaging Mojo
+ * Nuf Said...
+ */
+ function update_332008() {
+
+ /* First drop the existing tables */
+ $sql = "DROP TABLE flagged_song";
+ $db_results = mysql_query($sql, dbh());
+
+ $sql = "DROP TABLE flagged_types";
+ $db_results = mysql_query($sql, dbh());
+
+ $sql = "DROP TABLE flagged";
+ $db_results = mysql_query($sql, dbh());
+
+ /* Add in the spiffy new Flagged table */
+ $sql = "CREATE TABLE `flagged` (`id` int(11) unsigned NOT NULL auto_increment," .
+ " `object_id` int(11) unsigned NOT NULL default '0'," .
+ " `object_type` enum('artist','album','song') NOT NULL default 'song'," .
+ " `user` varchar(128) NOT NULL default ''," .
+ " `flag` enum('delete','retag','reencode','other') NOT NULL default 'other'," .
+ " `comment` varchar(255) NOT NULL default''," .
+ " PRIMARY KEY (`id`))";
+ $db_results = mysql_query($sql, dbh());
+
+ $this->set_version('db_version','332008');
+
+ } // update_332008
+
} // end update class
?>
diff --git a/modules/init.php b/modules/init.php
index 08f85645..22ca81b6 100644
--- a/modules/init.php
+++ b/modules/init.php
@@ -117,7 +117,7 @@ if (!$results['conf']['raw_web_path']) {
/* Variables needed for vauth Module */
//FIXME: Rename this array as we are no longer using libglue
$results['libglue']['cookie_path'] = $results['conf']['raw_web_path'];
-$results['libglue']['cookie_domain'] = $_SERVER['HTTP_HOST'];
+$results['libglue']['cookie_domain'] = $_SERVER['SERVER_NAME'];
$results['libglue']['cookie_life'] = $results['libglue']['sess_cookielife'];
$results['libglue']['session_name'] = $results['libglue']['sess_name'];
$results['libglue']['cookie_secure'] = '0';