Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 581b92d5 authored by Ronak Patel's avatar Ronak Patel
Browse files

added file_exists

parent 6d3dab2e
Loading
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
--- /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php	2024-01-18 23:59:45
+++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php	2024-01-19 00:13:16
@@ -318,10 +318,12 @@
 				$order = isset($nav['order']) ? $nav['order'] : 100;
 				$type = $nav['type'];
 				$route = !empty($nav['route']) ? $this->urlGenerator->linkToRoute($nav['route']) : '';
-				$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
+				$icon = isset($nav['icon']) ? $nav['icon'] : '';
+++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php	2024-01-19 01:03:23
@@ -321,7 +321,10 @@
 				$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
 				foreach ([$icon, "$app.svg"] as $i) {
 					try {
-						$icon = $this->urlGenerator->imagePath($app, $i);
+						if($icon !== ''){
+						$appPath = $this->appManager->getAppPath($app);
+						if (file_exists($appPath . '/img/' . $i)) {
+							$icon = $this->urlGenerator->imagePath($app, $i);
+						}
 						break;