1<?php
2/*
3* e107 website system
4*
5* Copyright (C) 2008-2013 e107 Inc (e107.org)
6* Released under the terms and conditions of the
7* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
8*
9* Check for admin events being triggered
10*
11*/
12function plugin_forum_admin_events($type, $parms)
13{
14	//We currently only care about system cache, so just return if it's not
15	if(!isset($parms['syscache']) || !$parms['syscache']) { return ''; }
16	switch($type)
17	{
18		case 'cache_clear':
19			$which = varset($parms['cachetag']);
20			if('nomd5_classtree' == $which)
21			{
22				return 'plugin_forum_admin_events_clear_moderators';
23			}
24			break;
25	}
26}
27
28//Called if classtree cache is cleared.  Meaning we'll need to rebuild moderator cache
29function plugin_forum_admin_events_clear_moderators()
30{
31	$e107 = e107::getInstance();
32	$e107->ecache->clear_sys('nomd5_forum_moderators');
33}
34
35