mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
58c126c476
commit
3efb817100
@ -41,6 +41,7 @@ class CACHE extends Memcache {
|
||||
);
|
||||
|
||||
public $CanClear = false;
|
||||
public $InternalCache = true;
|
||||
|
||||
function __construct() {
|
||||
$this->pconnect(MEMCACHED_HOST, MEMCACHED_PORT);
|
||||
@ -77,6 +78,9 @@ public function replace_value($Key, $Value, $Duration=2592000) {
|
||||
}
|
||||
|
||||
public function get_value($Key, $NoCache=false) {
|
||||
if(!$this->InternalCache) {
|
||||
$NoCache = true;
|
||||
}
|
||||
$StartTime=microtime(true);
|
||||
if (empty($Key)) {
|
||||
trigger_error("Cache retrieval failed for empty key");
|
||||
|
@ -134,6 +134,7 @@ protected function ip_check($IP,$Gline=false,$Channel=BOT_REPORT_CHAN) {
|
||||
|
||||
protected function listen() {
|
||||
global $Cache,$DB;
|
||||
$Cache->InternalCache = false;
|
||||
stream_set_timeout($this->Socket, 10000000000);
|
||||
while($this->State == 1){
|
||||
if($this->Data = fgets($this->Socket, 256)) {
|
||||
|
@ -1121,7 +1121,6 @@ function format_username($UserID, $Badges = false, $IsWarned = true, $IsEnabled
|
||||
$str.=($IsEnabled && $UserInfo['Enabled'] == 2) ? '<a href="rules.php"><img src="'.STATIC_SERVER.'common/symbols/disabled.png" alt="Banned" title="Be good, and you won\'t end up like this user" /></a>' : '';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$str.=($IsWarned && $UserInfo['Warned']!='0000-00-00 00:00:00') ? '<img src="'.STATIC_SERVER.'common/symbols/warned.png" alt="Warned" title="Warned" />' : '';
|
||||
|
@ -136,15 +136,15 @@
|
||||
if (is_numeric($MessageParts[$i + 1])) {
|
||||
$UserID = $MessageParts[++$i];
|
||||
}
|
||||
$URL = "user ".$UserID." ".'<a href="user.php?id='.$UserID.'">'.$MessageParts[++$i]."</a>";
|
||||
} elseif (strtolower($MessageParts[$i - 1]) != 'performed') {
|
||||
$URL = "user ".$UserID." ".'(<a href="user.php?id='.$UserID.'">'.substr($MessageParts[++$i],1,-1)."</a>)";
|
||||
} elseif (in_array($MessageParts[$i - 1], array('deleted','uploaded','edited','created','recovered'))) {
|
||||
$User = $MessageParts[++$i];
|
||||
if(substr($User,-1) == ':') {
|
||||
$User = substr($User, 0, -1);
|
||||
$Colon = true;
|
||||
}
|
||||
if(!isset($Usernames[$User])) {
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username = '".$User."'");
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username = _utf8 '".$User."' COLLATE utf8_bin");
|
||||
list($UserID) = $DB->next_record();
|
||||
$Usernames[$User] = $UserID ? $UserID : '';
|
||||
} else {
|
||||
@ -183,7 +183,7 @@
|
||||
if ($i == 1) {
|
||||
$User = $MessageParts[$i - 1];
|
||||
if(!isset($Usernames[$User])) {
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username = '".$User."'");
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username = _utf8 '".$User."' COLLATE utf8_bin");
|
||||
list($UserID) = $DB->next_record();
|
||||
$Usernames[$User] = $UserID ? $UserID : '';
|
||||
$DB->set_query_id($Log);
|
||||
|
@ -16,7 +16,8 @@ function get_fls() {
|
||||
FROM users_info AS i
|
||||
JOIN users_main AS m ON m.ID=i.UserID
|
||||
JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
WHERE p.DisplayStaff!='1' AND i.SupportFor!=''");
|
||||
JOIN users_levels AS l ON l.UserID = i.UserID
|
||||
WHERE l.PermissionID = 41");
|
||||
$FLS = $DB->to_array(false, MYSQLI_BOTH, array(3,'Paranoia'));
|
||||
$Cache->cache_value('fls', $FLS, 180);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Logged in user is staff
|
||||
$IsStaff = ($DisplayStaff == 1);
|
||||
// Logged in user is Staff or FLS
|
||||
$IsFLS = ($SupportFor != '' || $IsStaff);
|
||||
$IsFLS = ($IsStaff || $LoggedUser['ExtraClasses'][41]);
|
||||
|
||||
switch($_REQUEST['action']) {
|
||||
case 'viewconv':
|
||||
|
@ -862,15 +862,7 @@ function check_paranoia_here($Setting) {
|
||||
}
|
||||
}
|
||||
|
||||
include_once(SERVER_ROOT.'/sections/staff/functions.php');
|
||||
$FLS = get_fls();
|
||||
$IsFLS = false;
|
||||
foreach($FLS as $F) {
|
||||
if($LoggedUser['ID'] == $F['ID']) {
|
||||
$IsFLS = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$IsFLS = $LoggedUser['ExtraClasses'][41];
|
||||
if (check_perms('users_mod', $Class) || $IsFLS) {
|
||||
$UserLevel = $LoggedUser['EffectiveClass'];
|
||||
$DB->query("SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user