Work on Email and other major consistency work

This commit is contained in:
Deon George
2013-11-22 15:36:50 +11:00
parent 89deb9c97b
commit c18d5a3881
55 changed files with 550 additions and 575 deletions

View File

@@ -29,14 +29,9 @@ class Controller_Admin_Module_Method extends Controller_Admin_Module {
$mmo->module_id = $mo->id;
$mmo->values($_POST);
if (! $mmo->check() OR ! $mmo->save())
if (! $this->save($mmo))
throw HTTP_Exception::factory(501,'Unable to save data :post',array(':post'=>serialize($_POST)));
SystemMessage::factory()
->title('Record added')
->type('success')
->body(_('Method record has been added.'));
HTTP::redirect(URL::link('admin','module/edit/'.$mo->id));
}
@@ -69,7 +64,7 @@ class Controller_Admin_Module_Method extends Controller_Admin_Module {
if ($_POST) {
$mmo->values($_POST);
if (! $mmo->check() OR ! $mmo->save())
if (! $this->save($mmo))
throw HTTP_Exception::factory(501,'Unable to save data :post',array(':post'=>serialize($_POST)));
foreach (ORM::factory('Group')->find_all() as $go) {
@@ -91,7 +86,7 @@ class Controller_Admin_Module_Method extends Controller_Admin_Module {
'group_id'=>$go->id,
));
if (! $gmo->check() OR ! $gmo->save())
if (! $this->save($gmo))
SystemMessage::factory()
->title(_('Unable to SAVE Group Method'))
->type('error')