From fbb107f586bf3c63a5996e533ebedf6cbc6cbd53 Mon Sep 17 00:00:00 2001 From: Git Date: Fri, 1 Mar 2013 08:00:40 +0000 Subject: [PATCH] Empty commit --- sections/torrents/user.php | 2 ++ sections/upload/upload_handle.php | 22 +++++++++++++++------- sections/user/user.php | 3 ++- static/styles/global.css | 4 ++++ 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/sections/torrents/user.php b/sections/torrents/user.php index 91ea765f..f36715a9 100644 --- a/sections/torrents/user.php +++ b/sections/torrents/user.php @@ -1,4 +1,6 @@ 'Ascending', 'DESC'=>'Descending'); $UserVotes = Votes::get_user_votes($LoggedUser['ID']); diff --git a/sections/upload/upload_handle.php b/sections/upload/upload_handle.php index 7423886b..05f1919c 100644 --- a/sections/upload/upload_handle.php +++ b/sections/upload/upload_handle.php @@ -522,22 +522,30 @@ //----- Start inserts if(!$GroupID && $Type == 'Music') { + //array to store which artists we have added already, to prevent adding an artist twice + $ArtistsAdded = array(); foreach($ArtistForm as $Importance => $Artists) { foreach($Artists as $Num => $Artist) { if(!$Artist['id']) { - // Create artist - $DB->query("INSERT INTO artists_group (Name) VALUES ('".db_string($Artist['name'])."')"); - $ArtistID = $DB->inserted_id(); + if(isset($ArtistsAdded[strtolower($Artist['name'])])) { + $ArtistForm[$Importance][$Num] = $ArtistsAdded[strtolower($Artist['name'])]; + } else { + // Create artist + $DB->query("INSERT INTO artists_group (Name) VALUES ('".db_string($Artist['name'])."')"); + $ArtistID = $DB->inserted_id(); - $Cache->increment('stats_artist_count'); + $Cache->increment('stats_artist_count'); - $DB->query("INSERT INTO artists_alias (ArtistID, Name) VALUES (".$ArtistID.", '".db_string($Artist['name'])."')"); - $AliasID = $DB->inserted_id(); + $DB->query("INSERT INTO artists_alias (ArtistID, Name) VALUES (".$ArtistID.", '".db_string($Artist['name'])."')"); + $AliasID = $DB->inserted_id(); - $ArtistForm[$Importance][$Num] = array('id' => $ArtistID, 'aliasid' => $AliasID, 'name' => $Artist['name']); + $ArtistForm[$Importance][$Num] = array('id' => $ArtistID, 'aliasid' => $AliasID, 'name' => $Artist['name']); + $ArtistsAdded[strtolower($Artist['name'])] = $ArtistForm[$Importance][$Num]; + } } } } + unset($ArtistsAdded); } if(!$GroupID) { diff --git a/sections/user/user.php b/sections/user/user.php index c9d92012..26bf6074 100644 --- a/sections/user/user.php +++ b/sections/user/user.php @@ -485,7 +485,8 @@ function check_paranoia_here($Setting) {
- Profile + Profile -  + Hide 
diff --git a/static/styles/global.css b/static/styles/global.css index a5b323f4..7560feaf 100644 --- a/static/styles/global.css +++ b/static/styles/global.css @@ -424,3 +424,7 @@ tr.torrent .bookmark>a:after { .group_image img { cursor: pointer; } + +.user_title { + font-weight: normal; +}