Work on Email and other major consistency work
This commit is contained in:
@@ -25,16 +25,10 @@ class Controller_Admin_Export extends Controller_Export {
|
||||
|
||||
$edo = ORM::factory('Export_DataMap');
|
||||
|
||||
if ($_POST AND isset($_POST['item_id']) AND $edo->values($_POST)->check()) {
|
||||
if ($_POST AND isset($_POST['item_id']) AND $edo->values($_POST)->changed()) {
|
||||
$edo->status = 1;
|
||||
|
||||
if (! $edo->save())
|
||||
throw HTTP_Exception::factory(501,'Unable to save data :post',array(':post'=>serialize($_POST)));
|
||||
|
||||
SystemMessage::factory()
|
||||
->title('Record added')
|
||||
->type('success')
|
||||
->body(_('Export DataMap record has been added.'));
|
||||
$this->save($edo);
|
||||
}
|
||||
|
||||
Block::factory()
|
||||
@@ -87,16 +81,8 @@ class Controller_Admin_Export extends Controller_Export {
|
||||
if ($_POST AND isset($_POST['export_module_id'])) {
|
||||
$emo = ORM::factory('Export_Module',$_POST['export_module_id']);
|
||||
|
||||
if ($emo->loaded()) {
|
||||
$emo->values($_POST);
|
||||
$emo->save();
|
||||
|
||||
if ($emo->saved())
|
||||
SystemMessage::factory()
|
||||
->title('Record updated')
|
||||
->type('success')
|
||||
->body(_('Export Module record has been updated.'));
|
||||
}
|
||||
if ($emo->loaded() AND $emo->values($_POST)->changed() AND ! $this->save($emo))
|
||||
$emo->reload();
|
||||
}
|
||||
|
||||
if ($x = $this->request->param('id')) {
|
||||
|
Reference in New Issue
Block a user