// Check if Contacts app is enabled if (OC_Util::checkAppEnabled('contacts')) { // perform actions specific to enabled Contacts app } else { // perform actions when Contacts app is not enabled }
// Check if Gallery app is enabled if (OC_Util::checkAppEnabled('gallery')) { // perform actions specific to enabled Gallery app } else { // perform actions when Gallery app is not enabled }This code example checks if the Gallery app is enabled in ownCloud using the checkAppEnabled function. If it is enabled, the code proceeds to perform specific actions related to the Gallery app, otherwise, it performs actions specific to when the app is not enabled. Based on the function name and purpose, OC_Util is likely a package library for ownCloud that provides a set of utility functions for various tasks.