mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
b824718969
commit
100500502e
@ -9,6 +9,7 @@ Gazelle is a web framework geared towards private BitTorrent trackers. Although
|
||||
* [PHP 5.4 or later](http://us.php.net/) (required)
|
||||
* [Memcached](http://memcached.org/) (required)
|
||||
* [Sphinx](http://sphinxsearch.com/) (required)
|
||||
* [procps-ng](http://sourceforge.net/projects/procps-ng/) (recommended)
|
||||
|
||||
## Changelog
|
||||
You may have noticed that commits in the repository do not have have descriptive messages. If you are looking for a change log of Gazelle it can be [viewed here](https://raw.github.com/WhatCD/Gazelle/master/docs/CHANGES.txt). The change log is generated daily and includes new additions or modifications to Gazelle's source.
|
||||
|
@ -301,11 +301,6 @@ public static function has_donor_forum($UserID) {
|
||||
return self::get_rank($UserID) >= DONOR_FORUM_RANK || self::get_special_rank($UserID) >= MAX_SPECIAL_RANK;
|
||||
}
|
||||
|
||||
public static function is_mod($UserID) {
|
||||
$Permissions = Permissions::get_permissions_for_user($UserID);
|
||||
return isset($Permissions['users_mod']) && $Permissions['users_mod'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Put all the common donor info in the same cache key to save some cache calls
|
||||
*/
|
||||
@ -323,7 +318,7 @@ public static function get_donor_info($UserID) {
|
||||
} else {
|
||||
$Rank = $SpecialRank = $TotalRank = $DonationTime = 0;
|
||||
}
|
||||
if (self::is_mod($UserID)) {
|
||||
if (Permissions::is_mod($UserID)) {
|
||||
$Rank = MAX_EXTRA_RANK;
|
||||
$SpecialRank = MAX_SPECIAL_RANK;
|
||||
}
|
||||
|
@ -83,22 +83,27 @@ public static function get_permissions_for_user($UserID, $CustomPermissions = fa
|
||||
// This is legacy donor cruft
|
||||
if ($UserInfo['Donor']) {
|
||||
$DonorPerms = self::get_permissions(DONOR);
|
||||
unset($DonorPerms['Permissions']['MaxCollages']);
|
||||
} else {
|
||||
$DonorPerms = array('Permissions' => array());
|
||||
}
|
||||
|
||||
$MaxCollages = $Permissions['Permissions']['MaxCollages'] + $BonusCollages;
|
||||
if (isset($CustomPermissions['MaxCollages'])) {
|
||||
$MaxCollages += $CustomPermissions['MaxCollages'];
|
||||
unset($CustomPermissions['MaxCollages']);
|
||||
}
|
||||
$Permissions['MaxCollages'] = $MaxCollages;
|
||||
|
||||
//Combine the permissions
|
||||
$Permissions['Permissions']['MaxCollages'] = $MaxCollages;
|
||||
// Combine the permissions
|
||||
return array_merge(
|
||||
$Permissions['Permissions'],
|
||||
$BonusPerms,
|
||||
$CustomPermissions,
|
||||
$DonorPerms['Permissions']);
|
||||
}
|
||||
|
||||
public static function is_mod($UserID) {
|
||||
$Permissions = self::get_permissions_for_user($UserID);
|
||||
return isset($Permissions['users_mod']) && $Permissions['users_mod'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -185,7 +185,7 @@
|
||||
|
||||
// Load in the permissions
|
||||
$LoggedUser['Permissions'] = Permissions::get_permissions_for_user($LoggedUser['ID'], $LoggedUser['CustomPermissions']);
|
||||
$LoggedUser['Permissions']['MaxCollages'] += Donations::get_personal_collages($LoggedUser['ID'], check_perms('users_mod'));
|
||||
$LoggedUser['Permissions']['MaxCollages'] += Donations::get_personal_collages($LoggedUser['ID']);
|
||||
|
||||
// Change necessary triggers in external components
|
||||
$Cache->CanClear = check_perms('admin_clear_cache');
|
||||
|
@ -95,7 +95,7 @@
|
||||
$Type = $Types[$Short];
|
||||
$Reference = "reports.php?id=$ReportID#report$ReportID";
|
||||
?>
|
||||
<div id="report_<?=$ReportID?>" class="pending_report_v1">
|
||||
<div id="report_<?=$ReportID?>" style="margin-bottom: 1em;" class="pending_report_v1">
|
||||
<table cellpadding="5" id="report_<?=$ReportID?>">
|
||||
<tr>
|
||||
<td><strong><a href="<?=$Reference?>">Report #<?=$ReportID?></a></strong></td>
|
||||
@ -242,7 +242,6 @@
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<?
|
||||
$DB->set_query_id($Reports);
|
||||
}
|
||||
|
@ -3,6 +3,12 @@
|
||||
ob_end_flush();
|
||||
gc_enable();
|
||||
|
||||
/*
|
||||
* Use this if your version of pgrep does not support the '-c' option.
|
||||
* The '-c' option requires procps-ng.
|
||||
*
|
||||
* $PCount = chop(shell_exec("/usr/bin/pgrep -f schedule.php | wc -l"));
|
||||
*/
|
||||
$PCount = chop(shell_exec("/usr/bin/pgrep -cf schedule.php"));
|
||||
if ($PCount > 3) {
|
||||
// 3 because the cron job starts two processes and pgrep finds itself
|
||||
|
@ -211,7 +211,7 @@ function check_paranoia_here($Setting) {
|
||||
<a href="user.php?action=permissions&userid=<?=$UserID?>" class="brackets">Permissions</a>
|
||||
<?
|
||||
}
|
||||
if (check_perms('users_logout', $Class) && check_perms('users_view_ips', $Class)) {
|
||||
if (check_perms('users_view_ips', $Class)) {
|
||||
?>
|
||||
<a href="user.php?action=sessions&userid=<?=$UserID?>" class="brackets">Sessions</a>
|
||||
<?
|
||||
|
@ -5,26 +5,26 @@ $(document).ready(function() {
|
||||
$('#donor_title_prefix_preview').text($('#donor_title_prefix').val().trim() + ' ');
|
||||
$('#donor_title_suffix_preview').text(' ' + $('#donor_title_suffix').val().trim());
|
||||
|
||||
if($('#donor_title_comma').attr('checked')) {
|
||||
if ($('#donor_title_comma').attr('checked')) {
|
||||
$('#donor_title_comma_preview').text('');
|
||||
} else {
|
||||
$('#donor_title_comma_preview').text(', ');
|
||||
}
|
||||
|
||||
$('#donor_title_prefix').keyup(function() {
|
||||
if($(this).val().length <= 30) {
|
||||
if ($(this).val().length <= 30) {
|
||||
$('#donor_title_prefix_preview').text($(this).val().trim() + ' ');
|
||||
}
|
||||
});
|
||||
|
||||
$('#donor_title_suffix').keyup(function() {
|
||||
if($(this).val().length <= 30) {
|
||||
if ($(this).val().length <= 30) {
|
||||
$('#donor_title_suffix_preview').text(' ' + $(this).val().trim());
|
||||
}
|
||||
});
|
||||
|
||||
$('#donor_title_comma').change(function() {
|
||||
if($(this).attr('checked')) {
|
||||
if ($(this).attr('checked')) {
|
||||
$('#donor_title_comma_preview').text('');
|
||||
} else {
|
||||
$('#donor_title_comma_preview').text(', ');
|
||||
|
@ -202,7 +202,7 @@ function URL() {
|
||||
var length = 0;
|
||||
for (var i = 0; i < splitted.length; i++) {
|
||||
var q = splitted[i].split("=");
|
||||
if(q != "") {
|
||||
if (q != "") {
|
||||
query[q[0]] = q[1];
|
||||
length++;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ function Subscribe(topicid) {
|
||||
function SubscribeComments(page, pageid) {
|
||||
ajax.get('userhistory.php?action=comments_subscribe&page=' + page + '&pageid=' + pageid + '&auth=' + authkey, function() {
|
||||
var subscribeLink = $("#subscribelink_" + page + pageid).raw();
|
||||
if(subscribeLink) {
|
||||
if (subscribeLink) {
|
||||
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(0) == 'U'
|
||||
? "Subscribe"
|
||||
: "Unsubscribe";
|
||||
|
Loading…
Reference in New Issue
Block a user