Empty commit

This commit is contained in:
Git 2013-03-01 08:00:40 +00:00
parent 0d9c71f563
commit fbb107f586
4 changed files with 23 additions and 8 deletions

View File

@ -1,4 +1,6 @@
<? <?
$Orders = array('Time', 'Name', 'Seeders', 'Leechers', 'Snatched', 'Size'); $Orders = array('Time', 'Name', 'Seeders', 'Leechers', 'Snatched', 'Size');
$Ways = array('ASC'=>'Ascending', 'DESC'=>'Descending'); $Ways = array('ASC'=>'Ascending', 'DESC'=>'Descending');
$UserVotes = Votes::get_user_votes($LoggedUser['ID']); $UserVotes = Votes::get_user_votes($LoggedUser['ID']);

View File

@ -522,22 +522,30 @@
//----- Start inserts //----- Start inserts
if(!$GroupID && $Type == 'Music') { 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($ArtistForm as $Importance => $Artists) {
foreach($Artists as $Num => $Artist) { foreach($Artists as $Num => $Artist) {
if(!$Artist['id']) { if(!$Artist['id']) {
// Create artist if(isset($ArtistsAdded[strtolower($Artist['name'])])) {
$DB->query("INSERT INTO artists_group (Name) VALUES ('".db_string($Artist['name'])."')"); $ArtistForm[$Importance][$Num] = $ArtistsAdded[strtolower($Artist['name'])];
$ArtistID = $DB->inserted_id(); } 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'])."')"); $DB->query("INSERT INTO artists_alias (ArtistID, Name) VALUES (".$ArtistID.", '".db_string($Artist['name'])."')");
$AliasID = $DB->inserted_id(); $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) { if(!$GroupID) {

View File

@ -485,7 +485,8 @@ function check_paranoia_here($Setting) {
<? } ?> <? } ?>
<div class="box"> <div class="box">
<div class="head"> <div class="head">
<span style="float:left;">Profile<? if ($CustomTitle) { echo " - ".html_entity_decode($DisplayCustomTitle); } ?></span> <span style="float:left;">Profile&nbsp;-&nbsp;</span>
<span class="user_title"><? if ($CustomTitle) { echo html_entity_decode($DisplayCustomTitle); } ?></span>
<span style="float:right;"><?=!empty($Badges)?"$Badges&nbsp;&nbsp;":''?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Hide</a></span>&nbsp; <span style="float:right;"><?=!empty($Badges)?"$Badges&nbsp;&nbsp;":''?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Hide</a></span>&nbsp;
</div> </div>
<div class="pad" id="profilediv"> <div class="pad" id="profilediv">

View File

@ -424,3 +424,7 @@ tr.torrent .bookmark>a:after {
.group_image img { .group_image img {
cursor: pointer; cursor: pointer;
} }
.user_title {
font-weight: normal;
}