FEATURE: module history handler is not called only for module_settings
This commit is contained in:
@@ -4,7 +4,6 @@ namespace App\Models;
|
|||||||
|
|
||||||
use App\Handlers\Contracts\AppHandler;
|
use App\Handlers\Contracts\AppHandler;
|
||||||
use App\Handlers\Contracts\HistoryHandler;
|
use App\Handlers\Contracts\HistoryHandler;
|
||||||
use App\Handlers\Handler;
|
|
||||||
use App\Helpers\Differ;
|
use App\Helpers\Differ;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
@@ -66,6 +65,8 @@ class ContentHistory extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Getter for history handler of given module
|
||||||
|
*
|
||||||
* @param $change
|
* @param $change
|
||||||
*
|
*
|
||||||
* @return HistoryHandler
|
* @return HistoryHandler
|
||||||
@@ -74,15 +75,10 @@ class ContentHistory extends Model
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var $handler AppHandler
|
* @var $handler AppHandler
|
||||||
* @var $historyHandler HistoryHandler
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// get handler of given content page
|
// get handler of given content page
|
||||||
if ($change->column == 'module_settings') {
|
$handler = $change->module_handler;
|
||||||
$handler = $handler = $change->module_handler;
|
|
||||||
} else {
|
|
||||||
$handler = Handler::class;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $handler::getHistoryHandler();
|
return $handler::getHistoryHandler();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user