| @@ 382-407 (lines=26) @@ | ||
| 379 | /** |
|
| 380 | * @brief delete the comment |
|
| 381 | **/ |
|
| 382 | function procBoardDeleteComment() |
|
| 383 | { |
|
| 384 | // get the comment_srl |
|
| 385 | $comment_srl = Context::get('comment_srl'); |
|
| 386 | if(!$comment_srl) |
|
| 387 | { |
|
| 388 | return $this->doError('msg_invalid_request'); |
|
| 389 | } |
|
| 390 | ||
| 391 | // generate comment controller object |
|
| 392 | $oCommentController = getController('comment'); |
|
| 393 | ||
| 394 | $output = $oCommentController->deleteComment($comment_srl, $this->grant->manager); |
|
| 395 | if(!$output->toBool()) |
|
| 396 | { |
|
| 397 | return $output; |
|
| 398 | } |
|
| 399 | ||
| 400 | $this->add('mid', Context::get('mid')); |
|
| 401 | $this->add('page', Context::get('page')); |
|
| 402 | $this->add('document_srl', $output->get('document_srl')); |
|
| 403 | if(Context::get('xeVirtualRequestMethod') !== 'xml') |
|
| 404 | { |
|
| 405 | $this->setMessage('success_deleted'); |
|
| 406 | } |
|
| 407 | } |
|
| 408 | ||
| 409 | /** |
|
| 410 | * @brief delete the tracjback |
|
| @@ 412-434 (lines=23) @@ | ||
| 409 | /** |
|
| 410 | * @brief delete the tracjback |
|
| 411 | **/ |
|
| 412 | function procBoardDeleteTrackback() |
|
| 413 | { |
|
| 414 | $trackback_srl = Context::get('trackback_srl'); |
|
| 415 | ||
| 416 | // generate trackback module controller object |
|
| 417 | $oTrackbackController = getController('trackback'); |
|
| 418 | ||
| 419 | if(!$oTrackbackController) return; |
|
| 420 | ||
| 421 | $output = $oTrackbackController->deleteTrackback($trackback_srl, $this->grant->manager); |
|
| 422 | if(!$output->toBool()) |
|
| 423 | { |
|
| 424 | return $output; |
|
| 425 | } |
|
| 426 | ||
| 427 | $this->add('mid', Context::get('mid')); |
|
| 428 | $this->add('page', Context::get('page')); |
|
| 429 | $this->add('document_srl', $output->get('document_srl')); |
|
| 430 | if(Context::get('xeVirtualRequestMethod') !== 'xml') |
|
| 431 | { |
|
| 432 | $this->setMessage('success_deleted'); |
|
| 433 | } |
|
| 434 | } |
|
| 435 | ||
| 436 | /** |
|
| 437 | * @brief check the password for document and comment |
|