Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

New FireEvent in CategoryModel->GetFull

edited June 2011 in Vanilla 2.0 - 2.8
Hi all,

I'm writing a plugin which will hide categories so that a user only sees categories in his language. In order to make this change as system-wide as possible, I need a FireEvent in CategoryModel->GetFull.

I added the following

$this->FireEvent('AfterGetFullQuery');

after
$this->SQL
->Select('c.Name, c.CategoryID, c.TreeRight, c.TreeLeft, c.Depth, c.Description, c.CountDiscussions, c.CountComments, c.UrlCode, c.LastCommentID, c.PermissionCategoryID')
->Select('co.DateInserted', '', 'DateLastComment')
->Select('co.InsertUserID', '', 'LastCommentUserID')
->Select('cu.Name', '', 'LastCommentName')
->Select('cu.Photo', '', 'LastCommentPhoto')
->Select('co.DiscussionID', '', 'LastDiscussionID')
->Select('d.Name', '', 'LastDiscussionName')
->From('Category c')
->Join('Comment co', 'c.LastCommentID = co.CommentID', 'left')
->Join('User cu', 'co.InsertUserID = cu.UserID', 'left')
->Join('Discussion d', 'd.DiscussionID = co.DiscussionID', 'left')
->Where('c.AllowDiscussions', '1');
Any chance for this change to go mainstream so that I can update by VanillaBB in the feature? It works perfectly for me and it won't do any harm IMHO.

Thanks in advance!
Tagged:

Comments

Sign In or Register to comment.