function getStandardImage() { //OCP\Response::setExpiresHeader('P10D'); OCP\Response::enableCaching(); OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person_large.png')); exit; }
* Copyright (c) 2012 Georg Ehrke <*****@*****.**> * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') { header('HTTP/1.0 404 Not Found'); $tmpl = new OCP\Template('', '404', 'guest'); $tmpl->printPage(); exit; } $urlGenerator = \OC::$server->getURLGenerator(); $token = isset($_GET['t']) ? $_GET['t'] : ''; if ($token !== '') { OCP\Response::redirect($urlGenerator->linkToRoute('calendarplus.public.index', array('token' => $token))); } else { header('HTTP/1.0 404 Not Found'); $tmpl = new OCP\Template('', '404', 'guest'); $tmpl->printPage(); exit; }
break; case "sharedAbook": $href = OCP\Util::linkTo("contacts", "index.php"); break; case "sharedFile": $href = OCP\Util::linkTo("files", "index.php", array("dir" => "/Shared" . rtrim(dirname($notification["params"]["name"]), "/"))); break; case "sharedFolder": $href = OCP\Util::linkTo("files", "index.php", array("dir" => "/Shared" . $notification["params"]["name"])); break; default: $href = OCP\Util::linkTo("files", "index.php"); } } else { if ($notification["href"]) { $href = $notification["href"]; } else { $href = OCP\Util::linkTo("files", "index.php"); } } OCP\Response::redirect($href); } else { $tmpl = new OCP\Template("", $notification ? "403" : "404", "guest"); $tmpl->assign("file", sprintf("ID: %s", $id)); $tmpl->printPage(); } } catch (Exception $e) { $tmpl = new OCP\Template("", "404", "guest"); $tmpl->assign("file", $e->getMessage()); $tmpl->printPage(); }
function getStandardImage() { OCP\Response::enableCaching(); OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png')); }