public function Tinhte_XenTag_actionSave(XenResource_DataWriter_Resource $dw) { /* @var $tagModel Tinhte_XenTag_Model_Tag */ $tagModel = $this->getModelFromCache('Tinhte_XenTag_Model_Tag'); $resource = $dw->getMergedData(); if ($tagModel->canTagResource($resource)) { $tags = $tagModel->processInput($this->_input); if ($tags !== false) { $dw->Tinhte_XenTag_setTags($tags); } } // just to be safe... unset($GLOBALS[Tinhte_XenTag_Constants::GLOBALS_CONTROLLERPUBLIC_RESOURCE_SAVE]); }
public function bdSocialShare_actionIcon(XenResource_DataWriter_Resource $resourceDw) { $resource = $resourceDw->getMergedData(); $queueDate = $resource['resource_date'] + bdSocialShare_Shareable_XenResource_Resource::SECONDS_WAIT_FOR_ICON; $shareQueueModel = $this->getModelFromCache('bdSocialShare_Model_ShareQueue'); $queue = $shareQueueModel->getQueueAt($queueDate); if (!empty($queue)) { foreach ($queue as $id => $record) { $data = bdSocialShare_Helper_Common::unserializeOrFalse($record, 'queue_data'); if (!empty($data) and !empty($data['shareable'])) { $shareable = bdSocialShare_Shareable_Abstract::createFromRecoveryData($data['shareable']); if ($shareable instanceof bdSocialShare_Shareable_XenResource_Resource and $shareable->getId() == $resource['resource_id']) { $shareQueueModel->reInsertQueue($record, XenForo_Application::$time); } } } } unset($GLOBALS[bdSocialShare_Listener::XENRESOURCE_CONTROLLERPUBLIC_RESOURCE_ICON]); }