Ejemplo n.º 1
0
function getStandardImage()
{
    //OCP\Response::setExpiresHeader('P10D');
    OCP\Response::enableCaching();
    OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person_large.png'));
    exit;
}
Ejemplo n.º 2
0
 * 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;
}
Ejemplo n.º 3
0
                    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();
}
Ejemplo n.º 4
0
function getStandardImage()
{
    OCP\Response::enableCaching();
    OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
}