From 038af7e636ad8a2dc9ac342eaecd176cc5c35256 Mon Sep 17 00:00:00 2001
From: Tom Needham <needham.thomas@gmail.com>
Date: Sun, 29 Jul 2012 15:29:26 +0000
Subject: [PATCH] Add method to check if an app is shipped or not

---
 lib/app.php | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 mode change 100755 => 100644 lib/app.php

diff --git a/lib/app.php b/lib/app.php
old mode 100755
new mode 100644
index 56132c0867..60bd0ef476
--- a/lib/app.php
+++ b/lib/app.php
@@ -139,6 +139,20 @@ class OC_App{
 
 		OC_Appconfig::setValue($app,'types',$appTypes);
 	}
+	
+	/**
+	 * check if app is shipped
+	 * @param string $appid the id of the app to check
+	 * @return bool
+	 */
+	public function isShipped($appid){
+		$info = self::getAppInfo($appid);
+		if(isset($info['shipped']) && $info['shipped']=='true'){
+			return true;
+		} else {
+			return false;
+		}
+	}
 
 	/**
 	 * get all enabled apps
-- 
GitLab