public function store() { $page_name = $this->name; // cleanups to make directory transversal impossible // TODO proper cleanup of name! $page_name = str_replace('.', '_', $page_name); $page_name = str_replace('/', '_', $page_name); $page_name = str_replace('\\', '_', $page_name); $page_name = str_replace(' ', '_', $page_name); $dst_file = WikiConfig::getDiskPath() . '/' . $page_name; file_put_contents($dst_file, $this->text); return SqlObject::store($this, self::$tbl_name, 'name'); }
public function store() { return SqlObject::store($this, self::$tbl_name, 'id'); }
public function store() { $obj->time_saved = sql_datetime(time()); return SqlObject::store($this, self::$tbl_name, 'id'); }