mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
a0ace7a324
closes #1801 - adding fixBools method to `server/models/base.js` to convert bools to 1/0 to be consistent with MySQL & sqlite3 data providers (based on @ErisDS recommendation) - this in turn fixes the check in `server/controllers/frontend.js`, which does an explicit `post.page === 0` comparison (in pgsql this is a `boolean`, since the schema declares it as "bool" in `server/data/schema.js`, but MySQL/sqlite3 don't have concept of Boolean, only an integer or bit) - any model retrieved from persistence will pass through this (possible future refactoring is to combine fixBools & fixDates into one "canonicalize()" to have a single loop pass) |
||
---|---|---|
.. | ||
api | ||
config | ||
controllers | ||
data | ||
helpers | ||
middleware | ||
models | ||
permissions | ||
plugins | ||
routes | ||
storage | ||
views | ||
bookshelf-session.js | ||
errorHandling.js | ||
filters.js | ||
index.js | ||
mail.js | ||
require-tree.js |