[misc] rebuildFieldSetting when preview a pivot.
This commit is contained in:
@@ -34,7 +34,7 @@ class pivotModel extends model
|
||||
* @access public
|
||||
* @return object|bool
|
||||
*/
|
||||
public function getByID(int $pivotID, bool $processDateVar = false): object|bool
|
||||
public function getByID(int $pivotID, bool $processDateVar = true, $isPreview = false): object|bool
|
||||
{
|
||||
$pivot = $this->dao->select('*')->from(TABLE_PIVOT)
|
||||
->where('id')->eq($pivotID)
|
||||
@@ -58,7 +58,10 @@ class pivotModel extends model
|
||||
|
||||
$pivot->filters = $pivotFilters;
|
||||
|
||||
return $this->processPivot($pivot);
|
||||
$pivot = $this->processPivot($pivot);
|
||||
if($isPreview && isset($pivot->stage) && $pivot->stage == 'published') $this->processFieldSettings($pivot);
|
||||
|
||||
return $pivot;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -105,8 +108,6 @@ class pivotModel extends model
|
||||
if($isObject) $this->addDrills($pivot);
|
||||
}
|
||||
|
||||
// if($isObject && isset($pivot->stage) && $pivot->stage == 'published') $this->processFieldSettings($pivot);
|
||||
|
||||
return $isObject ? $pivot : $pivots;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ class pivotZen extends pivot
|
||||
*/
|
||||
public function show(int $groupID, int $pivotID): void
|
||||
{
|
||||
$pivot = $this->pivot->getByID($pivotID);
|
||||
$pivot = $this->pivot->getByID($pivotID, true, true);
|
||||
$driver = $pivot->driver;
|
||||
if(isset($_POST['filterValues']) and $_POST['filterValues'])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user