Load/Save settings

- renamed all settings with dot syntax
- refactored Menu->settings()
- changed schema of settings table to allow longer setting name and value
- added getAll() static method on Setting Model to fetch all settings (with proper unserialize of value)
This commit is contained in:
Jonathan Labreuille
2015-10-15 14:22:27 +02:00
parent c8c3f09fb2
commit 34c237ce8e
14 changed files with 282 additions and 244 deletions

View File

@ -60,8 +60,8 @@ class Migrator {
function settings() {
$attributes = array(
'id mediumint(9) NOT NULL AUTO_INCREMENT,',
'name varchar(20) NOT NULL,',
'value varchar(255) NOT NULL,',
'name varchar(50) NOT NULL,',
'value mediumtext NOT NULL,',
'created_at TIMESTAMP NOT NULL DEFAULT 0,',
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
'PRIMARY KEY (id),',