@@ 2773-2794 (lines=22) @@ | ||
2770 | * |
|
2771 | * @return object |
|
2772 | **/ |
|
2773 | function triggerGetDocumentMenu(&$menu_list) |
|
2774 | { |
|
2775 | if(!Context::get('is_logged')) return new BaseObject(); |
|
2776 | ||
2777 | $logged_info = Context::get('logged_info'); |
|
2778 | $document_srl = Context::get('target_srl'); |
|
2779 | ||
2780 | $oDocumentModel = getModel('document'); |
|
2781 | $columnList = array('document_srl', 'module_srl', 'member_srl', 'ipaddress'); |
|
2782 | $oDocument = $oDocumentModel->getDocument($document_srl, false, false, $columnList); |
|
2783 | $member_srl = $oDocument->get('member_srl'); |
|
2784 | $module_srl = $oDocument->get('module_srl'); |
|
2785 | ||
2786 | if(!$member_srl) return new BaseObject(); |
|
2787 | if($oDocumentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new BaseObject(); |
|
2788 | ||
2789 | $oDocumentController = getController('document'); |
|
2790 | $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
|
2791 | $oDocumentController->addDocumentPopupMenu($url,'cmd_spammer','','popup'); |
|
2792 | ||
2793 | return new BaseObject(); |
|
2794 | } |
|
2795 | ||
2796 | /** |
|
2797 | * trigger for comment.getCommentMenu. Append to popup menu a button for procMemberSpammerManage() |
|
@@ 2803-2824 (lines=22) @@ | ||
2800 | * |
|
2801 | * @return object |
|
2802 | **/ |
|
2803 | function triggerGetCommentMenu(&$menu_list) |
|
2804 | { |
|
2805 | if(!Context::get('is_logged')) return new BaseObject(); |
|
2806 | ||
2807 | $logged_info = Context::get('logged_info'); |
|
2808 | $comment_srl = Context::get('target_srl'); |
|
2809 | ||
2810 | $oCommentModel = getModel('comment'); |
|
2811 | $columnList = array('comment_srl', 'module_srl', 'member_srl', 'ipaddress'); |
|
2812 | $oComment = $oCommentModel->getComment($comment_srl, FALSE, $columnList); |
|
2813 | $module_srl = $oComment->get('module_srl'); |
|
2814 | $member_srl = $oComment->get('member_srl'); |
|
2815 | ||
2816 | if(!$member_srl) return new BaseObject(); |
|
2817 | if($oCommentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new BaseObject(); |
|
2818 | ||
2819 | $oCommentController = getController('comment'); |
|
2820 | $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
|
2821 | $oCommentController->addCommentPopupMenu($url,'cmd_spammer','','popup'); |
|
2822 | ||
2823 | return new BaseObject(); |
|
2824 | } |
|
2825 | ||
2826 | /** |
|
2827 | * Spammer manage. Denied user login. And delete or trash all documents. Response Ajax string |