Bugfix: Update / Edit Content
This is a minor release to fix a bug in the CMS editor - which would ignore changes made to content if a field was not present in the POST request (such as unchecking a checkbox), but there was intent to overwrite the value in the database.
In this release, we have separated the functionality of merging data (such as in the Update
method in the Updatedable
interface), into it's own exported function within the system/db package: UpdateContent(target string, data url.Values) (int, error)
. It is now solely responsible for merging fields into existing data in the database, whereas SetContent(target string, data url.Values) (int, error)
will exclusively insert or replace data into the database.
This way Ponzu developers have access to both of these individually to use as needed, rather than hiding them inside the HTTP handlers.
To get the latest version:
$ go get -u github.com/ponzu-cms/ponzu/...
$ cd $PROJ
$ ponzu upgrade