[SUGGESTION] - publish / unpublish redundant in fuel/controllers/module.php

edited September 2011 in News & Announcements
Iines 965 on...
Why instead of having the controller methods publish(), unpublish() call _publish_unpublish() with the relative id and action bound to the controller, wouldn't you put this method inside the Base_module_model?

And since we're here, why wouldn't you just make it a generic 'toggle_publish_state' method that would set the model's 'published' field to its opposite on request?

something like (pseudo-code obviously)


function toggle_published($id)


function toggle_publish_state()
$this->published = !$this->published
Just a curiousity here ... no trolling meant of course! :D


Sign In or Register to comment.