function loadContext() { global $db; if (Config::useUnserialize()) { $q = "select * from " . Config::dbSurvey() . "_context where suid=" . $this->getSuid() . " and version=" . $this->version; } else { $q = "select getfills, inlinefields, setfills from " . Config::dbSurvey() . "_context where suid=" . $this->getSuid() . " and version=" . $this->version; } $r = $db->selectQuery($q); $this->variabledescriptives = array(); $this->types = array(); $this->groups = array(); $this->sections = array(); if ($row = $db->getRow($r)) { if (Config::useUnserialize()) { if ($row["variables"] != "") { $this->variabledescriptives = unserialize(gzuncompress($row["variables"])); } if ($row["types"] != "") { $this->types = unserialize(gzuncompress($row["types"])); } if ($row["groups"] != "") { $this->groups = unserialize(gzuncompress($row["groups"])); } if ($row["sections"] != "") { $this->sections = unserialize(gzuncompress($row["sections"])); foreach ($this->sections as $s) { $this->sectionids[$s->getSeid()] = $s; } } } if ($row["getfills"] != "") { $this->getfillclasses = unserialize(gzuncompress($row["getfills"])); } if ($row["inlinefields"] != "") { $this->inlinefieldclasses = unserialize(gzuncompress($row["inlinefields"])); } if ($row["setfills"] != "") { $this->setfillclasses = unserialize(gzuncompress($row["setfills"])); } if ($row["checks"] != "") { $this->checkclasses = unserialize(gzuncompress($row["checks"])); } //echo 'loaded'; } }