adampatterson / Tentacle

Tentacle makes it easy to Design, Develop, and Write content for the web.
http://tentaclecms.com
Other
25 stars 3 forks source link

Tidy up model loading #192

Closed adampatterson closed 11 years ago

adampatterson commented 11 years ago

There is a lot of duplicate code loading models in various controllers.

Clean this up by moving references to class properties, and further on into the properties helper if it will work.

adampatterson commented 11 years ago

Moving models to a centra location doesn't help to clean up the code as it means moving from $post to $this->post_table

adampatterson commented 11 years ago

Removing $post = load::model('post') opens up more clear variables for controllers.

adampatterson commented 11 years ago

regular functions and static methods wont have access to the data_properties, this is needed for simplicity. Controllers and models have been adjusted.