KD2 Framework  Check-in [04ca11897e]

Overview
Comment:UserActions: fix typo
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | 5.6
Files: files | file ages | folders
SHA1: 04ca11897ec3fb480cc67dc163bb9531ed8cdc96
User & Date: bohwaz on 2019-02-19 14:52:37
Other Links: manifest | tags
Context
2019-02-19
14:52
Test: fix phpstan errors check-in: 6b9f506cab user: bohwaz tags: 5.6, trunk
14:52
UserActions: fix typo check-in: 04ca11897e user: bohwaz tags: 5.6, trunk
14:52
ZipWriter: use statements for exceptions check-in: 8826f9765e user: bohwaz tags: 5.6, trunk
Changes

Modified src/lib/KD2/UserActions.php from [b2df79da7a] to [e9f6ca50ff].

290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
	}

	public function isFlooding($action = null, $max_actions = 10, $time = 60)
	{
		$action = $action ? $this->db->where('action', $action) : 1;
		$ip = $this->db->where('ip', 'IN', $this->getIP());

		$query = sprint('SELECT COUNT(*) > ? FROM user_actions_log
			WHERE %s AND date > ? AND (%s);', $action, $ip);

		return $this->db->test($query, $max_actions, time() - $time);
	}

	/**
	 * Creates random errors and problems for hell-banned users and IPs







|







290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
	}

	public function isFlooding($action = null, $max_actions = 10, $time = 60)
	{
		$action = $action ? $this->db->where('action', $action) : 1;
		$ip = $this->db->where('ip', 'IN', $this->getIP());

		$query = sprintf('SELECT COUNT(*) > ? FROM user_actions_log
			WHERE %s AND date > ? AND (%s);', $action, $ip);

		return $this->db->test($query, $max_actions, time() - $time);
	}

	/**
	 * Creates random errors and problems for hell-banned users and IPs