Commit 29664617 authored by Mike Sheldon's avatar Mike Sheldon

Make parameter checks in generatePlayStats more compact

parent 84504bbf
......@@ -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