Ejemplo n.º 1
0
    public function load($id)
    {
        parent::load($id);
        // Load custom values
        $SQL = 'SELECT v.fieldid, ' . Custom_Field::getRawValueSQLExpr('v') . ' as value
				FROM custom_field_value v
				WHERE personid = ' . (int) $this->id;
        $res = $GLOBALS['db']->queryAll($SQL, NULL, NULL, true, FALSE, TRUE);
        check_db_result($res);
        $this->_custom_values = $res;
    }
Ejemplo n.º 2
0
 function load($id)
 {
     if ($id == 'TEMP') {
         if (!empty($_SESSION['saved_query'])) {
             $x = unserialize($_SESSION['saved_query']);
             $this->populate($x->id, $x->values);
         }
         return TRUE;
     } else {
         return parent::load($id);
     }
 }