Commit 339ecc24 authored by Mike Sheldon's avatar Mike Sheldon

Make parameter checks in generateTagCloud more compact

parent 2f07862f
......@@ -36,13 +36,7 @@ class TagCloud {
*/
static function generateTagCloud($table, $field, $limit = 40, $constraint = null, $constrained_field = false, $cache_period = 7200) {
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;
}
$sizes = array('xx-large', 'x-large', 'large', 'medium', 'small', 'x-small', 'xx-small');
......
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