Work on Email and other major consistency work
This commit is contained in:
@@ -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')
|
||||
|
@@ -20,16 +20,8 @@ class Controller_Admin_Setup extends Controller_TemplateDefault {
|
||||
public function action_edit() {
|
||||
$o = Company::instance()->so();
|
||||
|
||||
// Store our new values
|
||||
$o->values($_POST);
|
||||
|
||||
// Run validation and save
|
||||
if ($o->changed())
|
||||
if ($o->check() AND $o->save())
|
||||
SystemMessage::factory()
|
||||
->title('Record updated')
|
||||
->type('success')
|
||||
->body(_('Your setup record has been updated.'));
|
||||
if ($_POST AND $o->values($_POST)->changed() AND (! $this->save($o)))
|
||||
$o->reload();
|
||||
|
||||
Block::factory()
|
||||
->title('Update Site Configuration')
|
||||
|
22
application/classes/Controller/Admin/Welcome.php
Normal file
22
application/classes/Controller/Admin/Welcome.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* OSB Admin Main home page
|
||||
*
|
||||
* @package OSB
|
||||
* @category Controllers/Admin
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_Admin_Welcome extends Controller_Welcome {
|
||||
protected $auth_required = TRUE;
|
||||
public $secure_actions = array(
|
||||
'index'=>TRUE,
|
||||
);
|
||||
|
||||
public function action_index() {
|
||||
HTTP::redirect(URL::link('reseller','welcome'));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user