Empty commit

This commit is contained in:
Git 2011-12-06 08:00:14 +00:00
parent 392bbd036b
commit 9f708fcbfb
2 changed files with 8 additions and 6 deletions

View File

@ -1575,7 +1575,7 @@ function get_artists($GroupIDs, $Escape = array()) {
if(!is_number($GroupID)) { if(!is_number($GroupID)) {
continue; continue;
} }
$Artists = $Cache->get_value('groups_artists_'.$GroupID, true); $Artists = $Cache->get_value('groups_artists_'.$GroupID);
if(is_array($Artists)) { if(is_array($Artists)) {
$Results[$GroupID] = $Artists; $Results[$GroupID] = $Artists;
} else { } else {
@ -1610,6 +1610,10 @@ function get_artists($GroupIDs, $Escape = array()) {
$Cache->cache_value('groups_artists_'.$GroupID, array()); $Cache->cache_value('groups_artists_'.$GroupID, array());
} }
} }
$Missing = array_diff($GroupIDs, array_keys($Results));
if(!empty($Missing)) {
$Results += array_fill_keys($Missing, array());
}
} }
return $Results; return $Results;
} }
@ -1777,7 +1781,6 @@ function get_groups($GroupIDs, $Return = true, $GetArtists = true) {
$Cache->cache_value('torrent_group_'.$Torrent['GroupID'], array('ver'=>4, 'd'=>$Found[$Torrent['GroupID']]), 0); $Cache->cache_value('torrent_group_'.$Torrent['GroupID'], array('ver'=>4, 'd'=>$Found[$Torrent['GroupID']]), 0);
} }
} }
if($GetArtists) { if($GetArtists) {
$Artists = get_artists($GroupIDs); $Artists = get_artists($GroupIDs);
} else { } else {

View File

@ -197,13 +197,12 @@
<input type="button" value="Assign to forum staff" onClick="location.href='staffpm.php?action=assign&to=forum&convid=<?=$ConvID?>';" /> <input type="button" value="Assign to forum staff" onClick="location.href='staffpm.php?action=assign&to=forum&convid=<?=$ConvID?>';" />
<? } <? }
if ($Status != 'Resolved') { if ($Status != 'Resolved') { ?>
<input type="button" value="Resolve" onClick="location.href='staffpm.php?action=resolve&id=<?=$ConvID?>';" />
if ($IsFLS) { ?> <? if ($IsFLS) { //Moved by request ?>
<input type="button" value="Common answers" onClick="$('#common_answers').toggle();" /> <input type="button" value="Common answers" onClick="$('#common_answers').toggle();" />
<input type="button" value="Preview" onclick="PreviewMessage();" /> <input type="button" value="Preview" onclick="PreviewMessage();" />
<? } ?> <? } ?>
<input type="button" value="Resolve" onClick="location.href='staffpm.php?action=resolve&id=<?=$ConvID?>';" />
<input type="submit" value="Send message" /> <input type="submit" value="Send message" />
<? } else { ?> <? } else { ?>
<input type="button" value="Unresolve" onClick="location.href='staffpm.php?action=unresolve&id=<?=$ConvID?>';" /> <input type="button" value="Unresolve" onClick="location.href='staffpm.php?action=unresolve&id=<?=$ConvID?>';" />