private function builQuery($q) { $res = ""; $plen = GadgetRequest::getPageLength(); if ($plen !== null) { $q["pagelength"] = $plen; } $poff = GadgetRequest::getPageOffset(); if ($poff !== null) { $q["pageoffset"] = $poff; } foreach ($q as $k => $v) { $res .= $k . "=" . $v . "&"; } $res = substr($res, 0, strlen($res) - 1); return $res; }