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)
|
* [PHP 5.4 or later](http://us.php.net/) (required)
|
||||||
* [Memcached](http://memcached.org/) (required)
|
* [Memcached](http://memcached.org/) (required)
|
||||||
* [Sphinx](http://sphinxsearch.com/) (required)
|
* [Sphinx](http://sphinxsearch.com/) (required)
|
||||||
|
* [procps-ng](http://sourceforge.net/projects/procps-ng/) (recommended)
|
||||||
|
|
||||||
## Changelog
|
## 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.
|
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;
|
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
|
* 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 {
|
} else {
|
||||||
$Rank = $SpecialRank = $TotalRank = $DonationTime = 0;
|
$Rank = $SpecialRank = $TotalRank = $DonationTime = 0;
|
||||||
}
|
}
|
||||||
if (self::is_mod($UserID)) {
|
if (Permissions::is_mod($UserID)) {
|
||||||
$Rank = MAX_EXTRA_RANK;
|
$Rank = MAX_EXTRA_RANK;
|
||||||
$SpecialRank = MAX_SPECIAL_RANK;
|
$SpecialRank = MAX_SPECIAL_RANK;
|
||||||
}
|
}
|
||||||
|
@ -83,22 +83,27 @@ public static function get_permissions_for_user($UserID, $CustomPermissions = fa
|
|||||||
// This is legacy donor cruft
|
// This is legacy donor cruft
|
||||||
if ($UserInfo['Donor']) {
|
if ($UserInfo['Donor']) {
|
||||||
$DonorPerms = self::get_permissions(DONOR);
|
$DonorPerms = self::get_permissions(DONOR);
|
||||||
|
unset($DonorPerms['Permissions']['MaxCollages']);
|
||||||
} else {
|
} else {
|
||||||
$DonorPerms = array('Permissions' => array());
|
$DonorPerms = array('Permissions' => array());
|
||||||
}
|
}
|
||||||
|
|
||||||
$MaxCollages = $Permissions['Permissions']['MaxCollages'] + $BonusCollages;
|
$MaxCollages = $Permissions['Permissions']['MaxCollages'] + $BonusCollages;
|
||||||
if (isset($CustomPermissions['MaxCollages'])) {
|
if (isset($CustomPermissions['MaxCollages'])) {
|
||||||
$MaxCollages += $CustomPermissions['MaxCollages'];
|
$MaxCollages += $CustomPermissions['MaxCollages'];
|
||||||
|
unset($CustomPermissions['MaxCollages']);
|
||||||
}
|
}
|
||||||
$Permissions['MaxCollages'] = $MaxCollages;
|
$Permissions['Permissions']['MaxCollages'] = $MaxCollages;
|
||||||
|
// Combine the permissions
|
||||||
//Combine the permissions
|
|
||||||
return array_merge(
|
return array_merge(
|
||||||
$Permissions['Permissions'],
|
$Permissions['Permissions'],
|
||||||
$BonusPerms,
|
$BonusPerms,
|
||||||
$CustomPermissions,
|
$CustomPermissions,
|
||||||
$DonorPerms['Permissions']);
|
$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
|
// Load in the permissions
|
||||||
$LoggedUser['Permissions'] = Permissions::get_permissions_for_user($LoggedUser['ID'], $LoggedUser['CustomPermissions']);
|
$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
|
// Change necessary triggers in external components
|
||||||
$Cache->CanClear = check_perms('admin_clear_cache');
|
$Cache->CanClear = check_perms('admin_clear_cache');
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
$Type = $Types[$Short];
|
$Type = $Types[$Short];
|
||||||
$Reference = "reports.php?id=$ReportID#report$ReportID";
|
$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?>">
|
<table cellpadding="5" id="report_<?=$ReportID?>">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><a href="<?=$Reference?>">Report #<?=$ReportID?></a></strong></td>
|
<td><strong><a href="<?=$Reference?>">Report #<?=$ReportID?></a></strong></td>
|
||||||
@ -242,7 +242,6 @@
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<?
|
<?
|
||||||
$DB->set_query_id($Reports);
|
$DB->set_query_id($Reports);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
gc_enable();
|
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"));
|
$PCount = chop(shell_exec("/usr/bin/pgrep -cf schedule.php"));
|
||||||
if ($PCount > 3) {
|
if ($PCount > 3) {
|
||||||
// 3 because the cron job starts two processes and pgrep finds itself
|
// 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>
|
<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>
|
<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_prefix_preview').text($('#donor_title_prefix').val().trim() + ' ');
|
||||||
$('#donor_title_suffix_preview').text(' ' + $('#donor_title_suffix').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('');
|
$('#donor_title_comma_preview').text('');
|
||||||
} else {
|
} else {
|
||||||
$('#donor_title_comma_preview').text(', ');
|
$('#donor_title_comma_preview').text(', ');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#donor_title_prefix').keyup(function() {
|
$('#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_prefix_preview').text($(this).val().trim() + ' ');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#donor_title_suffix').keyup(function() {
|
$('#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_suffix_preview').text(' ' + $(this).val().trim());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#donor_title_comma').change(function() {
|
$('#donor_title_comma').change(function() {
|
||||||
if($(this).attr('checked')) {
|
if ($(this).attr('checked')) {
|
||||||
$('#donor_title_comma_preview').text('');
|
$('#donor_title_comma_preview').text('');
|
||||||
} else {
|
} else {
|
||||||
$('#donor_title_comma_preview').text(', ');
|
$('#donor_title_comma_preview').text(', ');
|
||||||
|
@ -202,7 +202,7 @@ function URL() {
|
|||||||
var length = 0;
|
var length = 0;
|
||||||
for (var i = 0; i < splitted.length; i++) {
|
for (var i = 0; i < splitted.length; i++) {
|
||||||
var q = splitted[i].split("=");
|
var q = splitted[i].split("=");
|
||||||
if(q != "") {
|
if (q != "") {
|
||||||
query[q[0]] = q[1];
|
query[q[0]] = q[1];
|
||||||
length++;
|
length++;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ function Subscribe(topicid) {
|
|||||||
function SubscribeComments(page, pageid) {
|
function SubscribeComments(page, pageid) {
|
||||||
ajax.get('userhistory.php?action=comments_subscribe&page=' + page + '&pageid=' + pageid + '&auth=' + authkey, function() {
|
ajax.get('userhistory.php?action=comments_subscribe&page=' + page + '&pageid=' + pageid + '&auth=' + authkey, function() {
|
||||||
var subscribeLink = $("#subscribelink_" + page + pageid).raw();
|
var subscribeLink = $("#subscribelink_" + page + pageid).raw();
|
||||||
if(subscribeLink) {
|
if (subscribeLink) {
|
||||||
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(0) == 'U'
|
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(0) == 'U'
|
||||||
? "Subscribe"
|
? "Subscribe"
|
||||||
: "Unsubscribe";
|
: "Unsubscribe";
|
||||||
|
Loading…
Reference in New Issue
Block a user