@@ 2678-2699 (lines=22) @@ | ||
2675 | * |
|
2676 | * @return object |
|
2677 | **/ |
|
2678 | function triggerGetDocumentMenu(&$menu_list) |
|
2679 | { |
|
2680 | if(!Context::get('is_logged')) return new Object(); |
|
2681 | ||
2682 | $logged_info = Context::get('logged_info'); |
|
2683 | $document_srl = Context::get('target_srl'); |
|
2684 | ||
2685 | $oDocumentModel = getModel('document'); |
|
2686 | $columnList = array('document_srl', 'module_srl', 'member_srl', 'ipaddress'); |
|
2687 | $oDocument = $oDocumentModel->getDocument($document_srl, false, false, $columnList); |
|
2688 | $member_srl = $oDocument->get('member_srl'); |
|
2689 | $module_srl = $oDocument->get('module_srl'); |
|
2690 | ||
2691 | if(!$member_srl) return new Object(); |
|
2692 | if($oDocumentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new Object(); |
|
2693 | ||
2694 | $oDocumentController = getController('document'); |
|
2695 | $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
|
2696 | $oDocumentController->addDocumentPopupMenu($url,'cmd_spammer','','popup'); |
|
2697 | ||
2698 | return new Object(); |
|
2699 | } |
|
2700 | ||
2701 | /** |
|
2702 | * trigger for comment.getCommentMenu. Append to popup menu a button for procMemberSpammerManage() |
|
@@ 2708-2729 (lines=22) @@ | ||
2705 | * |
|
2706 | * @return object |
|
2707 | **/ |
|
2708 | function triggerGetCommentMenu(&$menu_list) |
|
2709 | { |
|
2710 | if(!Context::get('is_logged')) return new Object(); |
|
2711 | ||
2712 | $logged_info = Context::get('logged_info'); |
|
2713 | $comment_srl = Context::get('target_srl'); |
|
2714 | ||
2715 | $oCommentModel = getModel('comment'); |
|
2716 | $columnList = array('comment_srl', 'module_srl', 'member_srl', 'ipaddress'); |
|
2717 | $oComment = $oCommentModel->getComment($comment_srl, FALSE, $columnList); |
|
2718 | $module_srl = $oComment->get('module_srl'); |
|
2719 | $member_srl = $oComment->get('member_srl'); |
|
2720 | ||
2721 | if(!$member_srl) return new Object(); |
|
2722 | if($oCommentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new Object(); |
|
2723 | ||
2724 | $oCommentController = getController('comment'); |
|
2725 | $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
|
2726 | $oCommentController->addCommentPopupMenu($url,'cmd_spammer','','popup'); |
|
2727 | ||
2728 | return new Object(); |
|
2729 | } |
|
2730 | ||
2731 | /** |
|
2732 | * Spammer manage. Denied user login. And delete or trash all documents. Response Ajax string |