Update MediaAdminController.php

Fix context detection