diff --git a/tools/modelGenerator.php b/tools/modelGenerator.php index bc14673..0d781f1 100755 --- a/tools/modelGenerator.php +++ b/tools/modelGenerator.php @@ -142,22 +142,22 @@ class modelGenerator } $f .= "\n"; $f .= " // The titles\n"; - $f .= " \$this->titles = array (\n"; + $f .= " \$this->titles (array (\n"; foreach ($schema["fields"] as $field=>$params) { $f .= " \"$field\" => _(\"$field\"),\n"; } - $f .= " );\n"; + $f .= " ));\n"; if (count ($schema["foreign"])) { $f .= "\n"; $f .= " // The foreign constraints\n"; - $f .= " \$this->foreign = array (\n"; + $f .= " \$this->foreign (array (\n"; foreach ($schema["foreign"] as $field=>$params) $f .= " \"$field\" => array (\n \"". implode ("\", \"", $params). "\"),\n"; - $f .= " );\n"; + $f .= " ));\n"; } $f .= " }\n";