Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions administrator/components/com_k2/models/items.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,24 @@ protected function onBeforeSave(&$data, $table)
{
$data['extra_fields'] = json_encode($data['extra_fields']);
}



// K2 Before Save plugin event . We trigger it here beacuse it is applied only to items ( like in v2 )
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('k2');
if (!$this->getState('patch'))
{
$isNew = $this->getState('isNew');
$dispatcher->trigger('onBeforeK2Save', array(
&$data,
$isNew
));
}





return true;

Expand Down