apps-custom.php 639 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Lukas Reschke <lukas@statuscode.ch>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. // Check if admin user
  9. OC_Util::checkAdminUser();
  10. // Set the content type to JSON
  11. header('Content-type: application/json');
  12. // Disallow caching
  13. header("Cache-Control: no-cache, must-revalidate");
  14. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
  15. $combinedApps = OC_App::listAllApps();
  16. foreach($combinedApps as $app) {
  17. echo("appData_".$app['id']."=".json_encode($app));
  18. echo("\n");
  19. }
  20. echo ("var appid =".json_encode($_GET['appid']).";");