diff --git a/settings/apps.php b/settings/apps.php index 9de7bdc80a..384e92bfbb 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -42,6 +42,7 @@ function app_sort( $a, $b ) { } +$combinedApps = OC_App::listAllApps(); usort( $combinedApps, 'app_sort' ); $tmpl = new OC_Template( "settings", "apps", "user" ); diff --git a/settings/js/apps-custom.php b/settings/js/apps-custom.php new file mode 100644 index 0000000000..e0e7a2d6c7 --- /dev/null +++ b/settings/js/apps-custom.php @@ -0,0 +1,24 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +// Check if admin user +OC_Util::checkAdminUser(); + +// Set the content type to JSON +header('Content-type: application/json'); + +// Disallow caching +header("Cache-Control: no-cache, must-revalidate"); +header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); + +$combinedApps = OC_App::listAllApps(); + +foreach($combinedApps as $app) { + echo("appData_".$app['id']."=".json_encode($app)); + echo("\n"); +} \ No newline at end of file diff --git a/settings/routes.php b/settings/routes.php index bac1f61fc5..1c766837dd 100644 --- a/settings/routes.php +++ b/settings/routes.php @@ -53,6 +53,8 @@ $this->create('settings_ajax_disableapp', '/settings/ajax/disableapp.php') ->actionInclude('settings/ajax/disableapp.php'); $this->create('settings_ajax_navigationdetect', '/settings/ajax/navigationdetect.php') ->actionInclude('settings/ajax/navigationdetect.php'); +$this->create('apps_custom', '/settings/js/apps-custom.js') + ->actionInclude('settings/js/apps-custom.php'); // admin $this->create('settings_ajax_getlog', '/settings/ajax/getlog.php') ->actionInclude('settings/ajax/getlog.php'); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 0490f63fb6..98b0e6c725 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -3,9 +3,8 @@ * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */?> - + +
t('Add your App');?> t('More Apps');?> @@ -15,9 +14,6 @@
  • data-id="" data-type="" data-installed="1"> - 3rd party' ?>
  • @@ -32,4 +28,4 @@
    - + \ No newline at end of file