Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/units/priorites/priority_eh.php
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Line(s) | |||||
{ | { | ||||
$del = $this->Application->RecallVar('priority_deleted'.$this->Application->GetVar('m_wid')); | $del = $this->Application->RecallVar('priority_deleted'.$this->Application->GetVar('m_wid')); | ||||
$del = $del ? unserialize($del) : array(); | $del = $del ? unserialize($del) : array(); | ||||
$priority_helper = $this->Application->recallObject('PriorityHelper'); | $priority_helper = $this->Application->recallObject('PriorityHelper'); | ||||
/* @var $priority_helper kPriorityHelper */ | /* @var $priority_helper kPriorityHelper */ | ||||
foreach ($del as $del_info) { | foreach ($del as $del_info) { | ||||
$dummy_event = new kEvent( array('prefix'=>$del_info['prefix'], 'name'=>'Dummy' ) ); | $dummy_event = new kEvent($del_info['prefix'] . ':OnDummy'); | ||||
$ids = $priority_helper->recalculatePriorities($dummy_event, $del_info['constrain'], $del_info['joins']); | $ids = $priority_helper->recalculatePriorities($dummy_event, $del_info['constrain'], $del_info['joins']); | ||||
if ($ids) { | if ($ids) { | ||||
$priority_helper->massUpdateChanged($del_info['prefix'], $ids); | $priority_helper->massUpdateChanged($del_info['prefix'], $ids); | ||||
} | } | ||||
} | } | ||||
$this->Application->RemoveVar('priority_deleted'.$this->Application->GetVar('m_wid')); | $this->Application->RemoveVar('priority_deleted'.$this->Application->GetVar('m_wid')); | ||||
Show All 37 Lines | |||||
/** | /** | ||||
* Processes OnMassMoveUp, OnMassMoveDown events | * Processes OnMassMoveUp, OnMassMoveDown events | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
*/ | */ | ||||
function OnChangePriority($event) | function OnChangePriority($event) | ||||
{ | { | ||||
$prefix = $this->Application->GetVar('priority_prefix'); | $prefix = $this->Application->GetVar('priority_prefix'); | ||||
$dummy_event = new kEvent( array('prefix'=>$prefix, 'name'=>'Dummy' ) ); | $dummy_event = new kEvent($prefix . ':OnDummy'); | ||||
$ids = $this->StoreSelectedIDs($dummy_event); | $ids = $this->StoreSelectedIDs($dummy_event); | ||||
if ($ids) { | if ($ids) { | ||||
$config = $this->Application->getUnitConfig($prefix); | $config = $this->Application->getUnitConfig($prefix); | ||||
$id_field = $config->getIDField(); | $id_field = $config->getIDField(); | ||||
$table_name = $config->getTableName(); | $table_name = $config->getTableName(); | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |