Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -5,8 +5,18 @@ class Voiceplanzone extends mfBaseModel {
|
||||
private $voiceplan;
|
||||
|
||||
public $cloned_destinations = [];
|
||||
|
||||
public function getDestinationCountOrPrefix() {
|
||||
|
||||
protected function beforeUpdate($data) {
|
||||
if(!array_key_exists("edit_by", $data)) {
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$data["edit_by"] = $me->id;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getDestinationCountOrPrefix() {
|
||||
$destinations = $this->getProperty("destinations");
|
||||
if(count($destinations) == 1) {
|
||||
return "+".$destinations[0]->prefix;
|
||||
|
||||
Reference in New Issue
Block a user