aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/package-lock.json18
-rw-r--r--build/package.json2
-rw-r--r--lib/private/App/AppManager.php16
-rw-r--r--lib/private/legacy/app.php2
-rw-r--r--lib/public/App/IAppManager.php11
5 files changed, 39 insertions, 10 deletions
diff --git a/build/package-lock.json b/build/package-lock.json
index 3897f3906fd..1825aa0b367 100644
--- a/build/package-lock.json
+++ b/build/package-lock.json
@@ -2079,9 +2079,9 @@
"dev": true
},
"handlebars": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
- "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.0.tgz",
+ "integrity": "sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==",
"dev": true,
"requires": {
"neo-async": "^2.6.0",
@@ -3213,9 +3213,9 @@
"dev": true
},
"neo-async": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz",
- "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==",
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
+ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==",
"dev": true
},
"nise": {
@@ -4633,9 +4633,9 @@
"dev": true
},
"uglify-js": {
- "version": "3.5.4",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.4.tgz",
- "integrity": "sha512-GpKo28q/7Bm5BcX9vOu4S46FwisbPbAmkkqPnGIpKvKTM96I85N6XHQV+k4I6FA2wxgLhcsSyHoNhzucwCflvA==",
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
+ "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
"dev": true,
"optional": true,
"requires": {
diff --git a/build/package.json b/build/package.json
index 9e1590976ad..9352a564578 100644
--- a/build/package.json
+++ b/build/package.json
@@ -11,7 +11,7 @@
"contributors": [],
"dependencies": {},
"devDependencies": {
- "handlebars": "^4.1.2",
+ "handlebars": "^4.2.0",
"jasmine-core": "~2.5.2",
"jasmine-sinon": "^0.4.0",
"jsdoc": "^3.6.3",
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 322731d677c..19242245600 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -13,6 +13,7 @@
* @author Robin Appelman <robin@icewind.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com>
+ * @author Daniel Rudolf <nextcloud.com@daniel-rudolf.de>
*
* @license AGPL-3.0
*
@@ -404,6 +405,21 @@ class AppManager implements IAppManager {
}
/**
+ * Get the web path for the given app.
+ *
+ * @param string $appId
+ * @return string
+ * @throws AppPathNotFoundException if app path can't be found
+ */
+ public function getAppWebPath(string $appId): string {
+ $appWebPath = \OC_App::getAppWebPath($appId);
+ if($appWebPath === false) {
+ throw new AppPathNotFoundException('Could not find web path for ' . $appId);
+ }
+ return $appWebPath;
+ }
+
+ /**
* Clear the cached list of apps when enabling/disabling an app
*/
public function clearAppsCache() {
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 58b617aae45..9e47f9064d9 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -485,6 +485,7 @@ class OC_App {
*
* @param string $appId
* @return string|false
+ * @deprecated 11.0.0 use \OC::$server->getAppManager()->getAppPath()
*/
public static function getAppPath(string $appId) {
if ($appId === null || trim($appId) === '') {
@@ -503,6 +504,7 @@ class OC_App {
*
* @param string $appId
* @return string|false
+ * @deprecated 18.0.0 use \OC::$server->getAppManager()->getAppWebPath()
*/
public static function getAppWebPath(string $appId) {
if (($dir = self::findAppInDirectories($appId)) != false) {
diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php
index aebd47b3a2d..391e3f0dd64 100644
--- a/lib/public/App/IAppManager.php
+++ b/lib/public/App/IAppManager.php
@@ -8,6 +8,7 @@
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @author Daniel Rudolf <nextcloud.com@daniel-rudolf.de>
*
* @license AGPL-3.0
*
@@ -126,6 +127,16 @@ interface IAppManager {
public function getAppPath($appId);
/**
+ * Get the web path for the given app.
+ *
+ * @param string $appId
+ * @return string
+ * @since 18.0.0
+ * @throws AppPathNotFoundException
+ */
+ public function getAppWebPath(string $appId): string;
+
+ /**
* List all apps enabled for a user
*
* @param \OCP\IUser $user