Empty commit

This commit is contained in:
Git 2012-03-29 08:00:19 +00:00
parent c35708e845
commit e8b47246a2
8 changed files with 50 additions and 16 deletions

View File

@ -22,17 +22,21 @@
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
$FlacID = $GroupIDs[$GroupID]['TorrentID'];
$DisplayName = '';
$JsonArtists = array();
if(count($Artists)>0) {
$DisplayName = display_artists(array('1'=>$Artists));
foreach ($Artists as $Artist) {
$JsonArtists[] = array(
'id' => (int) $Artist['id'],
'name' => $Artist['name'],
'aliasId' => (int) $Artist['aliasid']
);
}
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
$JsonResults[] = array(
'torrentId' => (int) $FlacID,
'groupId' => (int) $GroupID,
'artist' => $Artists,
'artist' => $JsonArtists,
'groupName' => $GroupName,
'groupYear' => (int) $GroupYear,
'downloadUrl' => 'torrents.php?action=download&id='.$FlacID.'&authkey='.$LoggedUser['AuthKey'].'&torrent_pass='.$LoggedUser['torrent_pass']

View File

@ -4,7 +4,7 @@ function compare($X, $Y){
return($Y['score'] - $X['score']);
}
define(MAX_PERS_COLLAGES, 3); // How many personal collages should be shown by default
define('MAX_PERS_COLLAGES', 3); // How many personal collages should be shown by default
include(SERVER_ROOT.'/sections/bookmarks/functions.php'); // has_bookmarked()
include(SERVER_ROOT.'/classes/class_text.php');
@ -664,7 +664,7 @@ function filelist($Str) {
$PersonalCollages = $Cache->get_value('torrent_collages_personal_'.$GroupID);
if(!is_array($PersonalCollages)) {
$DB->query("SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_torrents AS ct ON ct.CollageID=c.ID WHERE ct.GroupID='$GroupID' AND Deleted='0' AND CategoryID='0'");
$PersonalCollages = $DB->to_array(false, MYSQL_NUM);
$PersonalCollages = $DB->to_array(false, MYSQLI_NUM);
$Cache->cache_value('torrent_collages_personal_'.$GroupID, $PersonalCollages, 3600*6);
}

View File

@ -72,7 +72,20 @@
break;
case 'moderate':
include('takemoderate.php');
break;
break;
case 'clearcache':
if (!check_perms('admin_clear_cache') || !check_perms('users_mod')) {
error(403);
}
$UserID = $_REQUEST['id'];
$Cache->delete_value('user_info_'.$UserID);
$Cache->delete_value('user_info_heavy_'.$UserID);
$Cache->delete_value('subscriptions_user_new_'.$UserID);
$Cache->delete_value('staff_pm_new_'.$UserID);
$Cache->delete_value('inbox_new_'.$UserID);
$Cache->delete_value('notifications_new_'.$UserID);
$Cache->delete_value('collage_subs_user_new_'.$UserID);
// no break, load the profile
default:
if (isset($_REQUEST['id'])) {
include(SERVER_ROOT.'/sections/user/user.php');

View File

@ -30,7 +30,7 @@
<h3>
<a href="feeds.php?feed=torrents_notify_<?=$N['ID']?>_<?=$LoggedUser['torrent_pass']?>&amp;user=<?=$LoggedUser['ID']?>&amp;auth=<?=$LoggedUser['RSS_Auth']?>&amp;passkey=<?=$LoggedUser['torrent_pass']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($N['Label'])?>"><img src="<?=STATIC_SERVER?>/common/symbols/rss.png" alt="RSS feed" /></a>
<?=display_str($N['Label'])?>
<a href="user.php?action=notify_delete&amp;id=<?=$N['ID']?>&amp;auth=<?=$LoggedUser['AuthKey']?>">(Delete)</a>
<a href="user.php?action=notify_delete&amp;id=<?=$N['ID']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" onClick="return confirm('Are you sure you want to delete this notification filter?')">(Delete)</a>
<a href="#" onClick="$('#filter_<?=$N['ID']?>').toggle(); return false;">(Show)</a>
</h3>
<? } ?>

View File

@ -16,6 +16,7 @@
// End checking for moronity
$UserID = $_POST['userid'];
$DeleteKeys = false;
// Variables for database input
$Class = (int)$_POST['Class'];
@ -253,6 +254,7 @@
$UpdateSet[]="PermissionID='$Class'";
$EditSummary[]="class changed to ".make_class_string($Class);
$LightUpdates['PermissionID']=$Class;
$DeleteKeys = true;
$DB->query("SELECT DISTINCT DisplayStaff FROM permissions WHERE ID = $Class OR ID = ".$ClassLevels[$Cur['Class']]['ID']);
if($DB->record_count() == 2) {
@ -324,6 +326,7 @@
} else {
$LightUpdates['ExtraClasses']= array();
}
$DeleteKeys = true;
}
if (count($AddedClasses) > 0) {
$ClassChanges = array();
@ -336,7 +339,8 @@
$Values[] = "($UserID, $PermID)";
}
$DB->query("INSERT INTO users_levels (UserID, PermissionID) VALUES ".implode(', ',$Values));
$LightUpdates['ExtraClasses']= array_fill_keys($SecondaryClasses, 1);
//$LightUpdates['ExtraClasses']= array_fill_keys($SecondaryClasses, 1);
$DeleteKeys = true;
}
if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) {
@ -666,13 +670,18 @@
}
}
$Cache->begin_transaction('user_info_'.$UserID);
$Cache->update_row(false, $LightUpdates);
$Cache->commit_transaction(0);
if ($DeleteKeys) {
$Cache->delete_value('user_info_'.$UserID);
$Cache->delete_value('user_info_heavy_'.$UserID);
} else {
$Cache->begin_transaction('user_info_'.$UserID);
$Cache->update_row(false, $LightUpdates);
$Cache->commit_transaction(0);
$Cache->begin_transaction('user_info_heavy_'.$UserID);
$Cache->update_row(false, $HeavyUpdates);
$Cache->commit_transaction(0);
$Cache->begin_transaction('user_info_heavy_'.$UserID);
$Cache->update_row(false, $HeavyUpdates);
$Cache->commit_transaction(0);
}
$Summary = '';
// Create edit summary

View File

@ -189,6 +189,10 @@ function check_paranoia_here($Setting) {
if (check_perms('users_mod')) {
?>
[<a href="userhistory.php?action=token_history&amp;userid=<?=$UserID?>">FL Tokens</a>]
<? }
if (check_perms('admin_clear_cache') && check_perms('users_mod')) {
?>
[<a href="user.php?action=clearcache&amp;id=<?=$UserID?>">Clear Cache</a>]
<? } ?>
</div>

View File

@ -23,6 +23,8 @@
$UsersOnly = $_GET['usersonly'];
$DB->query("SELECT Username FROM users_main WHERE ID = ".$UserID);
list($Username)= $DB->next_record();
show_header("Email history for $Username");
if ($UsersOnly == 1) {

View File

@ -22,6 +22,8 @@
$UsersOnly = $_GET['usersonly'];
$DB->query("SELECT Username FROM users_main WHERE ID = ".$UserID);
list($Username)= $DB->next_record();
show_header("Email history for $Username");
// Get current email (and matches)