public function canUploadToCategory(array $category, &$errorPhraseKey = '', array $viewingUser = null) { $this->standardizeViewingUserReference($viewingUser); if (!$this->canViewCategory($category, $errorPhraseKey, $viewingUser)) { return false; } if (empty($category['category_privacy']['post'])) { return true; } if (in_array(-1, $category['category_privacy']['post'])) { return true; } if (XenForo_Template_Helper_Core::helperIsMemberOf($viewingUser, $category['category_privacy']['post'])) { return true; } $errorPhraseKey = 'sonnb_xengallery_you_do_not_have_permission_to_upload_this_category'; return false; }