getUrlGenerator(); $urlComponents = parse_url($urlGenerator->getCurrentUrlDir(true)); $base = $urlComponents['path']; /* fix for multisite installs */ $baseURL = $gallery->getConfig('galleryBaseUrl'); if (!empty($baseURL)) { $base = $baseURL; } /* Make sure the user has permission to do this operation */ $ret = GalleryCoreApi::assertUserIsSiteAdministrator(); if ($ret) { return $ret->wrap(__FILE__, __LINE__); } $status = array(); $results = array(); $error = array(); ?>