/** * Clean values of all variables of the object for storage. * also add slashes and quote string wherever needed * * @param XoopsObject $object object to act on * * @return bool true if successful * @access public */ public function cleanVars(XoopsObject $object) { $vars = $object->getVars(); $object->cleanVars = array(); foreach ($vars as $k => $v) { if (!$v["changed"]) { continue; } $object->cleanVars[$k] = Dtype::cleanVar($object, $k); } $object->unsetDirty(); $errors = $object->getErrors(); return empty($errors) ? true : false; }