Work on Email and other major consistency work
This commit is contained in:
@@ -22,6 +22,9 @@ abstract class ORM extends Kohana_ORM {
|
||||
// Tables that do not have a site_id column
|
||||
public static $no_site_id_tables = array('setup','country','currency','language','tax');
|
||||
|
||||
// Whether to show a SystemMessage when a record is saved.
|
||||
protected $_save_message = FALSE;
|
||||
|
||||
/**
|
||||
* Add our OSB site_id to each SELECT query
|
||||
* @see parent::__build()
|
||||
@@ -215,6 +218,18 @@ abstract class ORM extends Kohana_ORM {
|
||||
return $x;
|
||||
}
|
||||
|
||||
public function save(Validation $validation=NULL) {
|
||||
parent::save();
|
||||
|
||||
if ($this->saved() AND $this->_save_message)
|
||||
SystemMessage::factory()
|
||||
->title('Record Updated')
|
||||
->type('success')
|
||||
->body(sprintf('Record %s:%s Updated',$this->_table_name,$this->id));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function where_active() {
|
||||
return $this->_where_active();
|
||||
}
|
||||
|
Reference in New Issue
Block a user