public static function getRuleModuleName($module_id, $action, $adminOnly) {

		$db = Database::getInstance();

		$query =
			' SELECT m.name AS moduleName,r.action AS ruleAction, r.admin_only '.
			' FROM `rules` AS r '.
			' INNER JOIN `modules` AS m ON m.id = r.module_id '.
			' WHERE m.id = ? AND r.action = ? AND r.admin_only = ?';

		$db->setQuery($query);
		$module = $db->loadObject(array($module_id, $action, $adminOnly));

		return $module;

	}