/** * Shows the albums and pictures the token gives access to * * @param $token * * @return TemplateResponse */ private function showPublicPage($token) { $albumName = $this->environment->getSharedFolderName(); list($server2ServerSharing, $protected) = $this->getServer2ServerProperties(); // Parameters sent to the template $params = ['appName' => $this->appName, 'token' => $token, 'displayName' => $this->environment->getDisplayName(), 'albumName' => $albumName, 'server2ServerSharing' => $server2ServerSharing, 'protected' => $protected, 'filename' => $albumName]; // Will render the page using the template found in templates/public.php $response = new TemplateResponse($this->appName, 'public', $params, 'public'); $this->addContentSecurityToResponse($response); return $response; }
/** * Shows the albums and pictures the token gives access to * * @param $token * * @return TemplateResponse */ private function showPublicPage($token) { $albumName = $this->environment->getSharedFolderName(); $server2ServerSharing = $this->appConfig->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes'); $server2ServerSharing = $server2ServerSharing === 'yes' ? true : false; $protected = $this->environment->isShareProtected(); $protected = $protected ? 'true' : 'false'; // Parameters sent to the template $params = ['appName' => $this->appName, 'token' => $token, 'displayName' => $this->environment->getDisplayName(), 'albumName' => $albumName, 'server2ServerSharing' => $server2ServerSharing, 'protected' => $protected, 'filename' => $albumName]; // Will render the page using the template found in templates/public.php return new TemplateResponse($this->appName, 'public', $params, 'public'); }