apps-custom.php 629 B

1234567891011121314151617181920212223242526
  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 =\"".$_GET['appid']."\";");