Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Comment Removal
This discussion has been closed.
Comments
$Context->SetDefinition(...)
instead of
$Context->Dictionary[...] = ...
Here's a working version wich will get translated correctly in vanilla 1.*:
$Context->SetDefinition('PERMISSION_REMOVE_COMMENTS', 'Can remove any comment and discussion'); $Context->SetDefinition('PERMISSION_REMOVE_OWN_COMMENTS', 'Can remove their own comments and discussions (with no replies)'); $Context->SetDefinition('remove', 'remove'); $Context->SetDefinition('VerifyDiscussionRemoval', 'Are you quite sure you want to permanently remove this discussion?'); $Context->SetDefinition('VerifyCommentRemoval', 'Are you quite sure you want to permanently remove this comment?');
For example. We have 50 comments and 1 removed whispered comment. Vanilla will point us to ?page=2 and there are no any comments.
$DiscFields['TotalWhisperCount'].' = '.($ComInfo['whisper_count'] - 1).', '.$DiscFields['WhisperToLastUserID'].' = '.$NextCom['whisperto'].', '.$DiscFields['WhisperFromLastUserID'].' = '.$NextCom['whisperuser'].', '.$DiscFields['DateLastWhisper'].' = \''.$NextCom['whispercreated'].'\''
to
$DiscFields['TotalWhisperCount'].' = '.($ComInfo['whisper_count'] - 1).', '.$DiscFields['WhisperToLastUserID'].' = '.(int) $NextCom['whisperto'].', '.$DiscFields['WhisperFromLastUserID'].' = '.(int) $NextCom['whisperuser'].', '.$DiscFields['DateLastWhisper'].' = \''.$NextCom['whispercreated'].'\''
PLEASE! Use $Context->SetDefinition instead $Context->Dictionary and be hero.
P.S.
Why you use $Context->GetDefinition if you don't set any definition ?
I'm sorry I've pissed you off so much shizo :-P the direct assignments to the dictionary were relics of when there wasn't a SetDefinition function, but I've updated that as well.