We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e9d5a90c authored by Mike Sheldon's avatar Mike Sheldon

Make parameter checks in generatePlayStats more compact

parent bbb26e2a
......@@ -36,13 +36,7 @@ class Statistic {
*/
static function generatePlayStats($table, $field, $limit = 40, $constraint = null, $maxwidth = 100) {
global $adodb;
if (!is_string($field)) {
return false;
}
if (!is_string($table)) {
return false;
}
if (!is_integer($limit)) {
if (!is_string($field) || !is_string($table) || !is_integer($limit)) {
return false;
}
$query = 'SELECT ' . $field . ', count(*) AS count FROM ' . $table;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment