|
@@ 14-32 (lines=19) @@
|
| 11 |
|
{ |
| 12 |
|
var $ping_message = ''; |
| 13 |
|
|
| 14 |
|
function triggerInsertDocument(&$obj) { |
| 15 |
|
if($obj->module_srl < 1) return $this->makeObject(); |
| 16 |
|
if($obj->status !== 'PUBLIC') return $this->makeObject(); |
| 17 |
|
|
| 18 |
|
$oSyndicationModel = getModel('syndication'); |
| 19 |
|
$oModuleModel = getModel('module'); |
| 20 |
|
|
| 21 |
|
if($oSyndicationModel->isExceptedModules($obj->module_srl)) return $this->makeObject(); |
| 22 |
|
|
| 23 |
|
$config = $oModuleModel->getModuleConfig('syndication'); |
| 24 |
|
|
| 25 |
|
if($config->syndication_use!='Y') return $this->makeObject(); |
| 26 |
|
|
| 27 |
|
$target_id = sprintf('%s-%s', $obj->module_srl, $obj->document_srl); |
| 28 |
|
$id = $oSyndicationModel->getID('article', $target_id); |
| 29 |
|
$this->ping($id, 'article'); |
| 30 |
|
|
| 31 |
|
return $this->makeObject(); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
function triggerUpdateDocument(&$obj) { |
| 35 |
|
if($obj->module_srl < 1) return $this->makeObject(); |
|
@@ 34-60 (lines=27) @@
|
| 31 |
|
return $this->makeObject(); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
function triggerUpdateDocument(&$obj) { |
| 35 |
|
if($obj->module_srl < 1) return $this->makeObject(); |
| 36 |
|
|
| 37 |
|
$oSyndicationModel = getModel('syndication'); |
| 38 |
|
$oModuleModel = getModel('module'); |
| 39 |
|
|
| 40 |
|
if($oSyndicationModel->isExceptedModules($obj->module_srl)) return $this->makeObject(); |
| 41 |
|
|
| 42 |
|
$config = $oModuleModel->getModuleConfig('syndication'); |
| 43 |
|
|
| 44 |
|
if($config->syndication_use!='Y') return $this->makeObject(); |
| 45 |
|
|
| 46 |
|
$target_id = sprintf('%s-%s', $obj->module_srl, $obj->document_srl); |
| 47 |
|
$id = $oSyndicationModel->getID('article', $target_id); |
| 48 |
|
|
| 49 |
|
// PUBLIC 외 삭제 |
| 50 |
|
if($obj->status === 'PUBLIC') |
| 51 |
|
{ |
| 52 |
|
$this->ping($id, 'article'); |
| 53 |
|
} |
| 54 |
|
else |
| 55 |
|
{ |
| 56 |
|
$this->ping($id, 'deleted'); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
return $this->makeObject(); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
function triggerDeleteDocument(&$obj) { |
| 63 |
|
if($obj->module_srl < 1) return $this->makeObject(); |