public.php 633 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * @author Lukas Reschke
  4. * @copyright 2014 Lukas Reschke lukas@owncloud.com
  5. *
  6. * This file is licensed under the Affero General Public License version 3 or
  7. * later.
  8. * See the COPYING-README file.
  9. */
  10. // This file is just used to redirect the legacy sharing URLs (< ownCloud 8) to the new ones
  11. $urlGenerator = new \OC\URLGenerator(\OC::$server->getConfig());
  12. $token = isset($_GET['t']) ? $_GET['t'] : '';
  13. $route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare';
  14. OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token)));