diff --git a/apps/dependencies_chk/appinfo/app.php b/apps/dependencies_chk/appinfo/app.php new file mode 100644 index 0000000000..dea2cd39f8 --- /dev/null +++ b/apps/dependencies_chk/appinfo/app.php @@ -0,0 +1,9 @@ + 14, + 'id' => 'dependencies_chk', + 'name' => 'Owncloud Install Info' )); + +OC_APP::registerAdmin('dependencies_chk','settings'); diff --git a/apps/dependencies_chk/appinfo/info.xml b/apps/dependencies_chk/appinfo/info.xml new file mode 100644 index 0000000000..38a6dee256 --- /dev/null +++ b/apps/dependencies_chk/appinfo/info.xml @@ -0,0 +1,11 @@ + + + dependencies_chk + Owncloud dependencies info + 0.01 + MIT + Brice Maron (eMerzh) + 2 + Display OwnCloud's dependencies informations (missings modules, ...) + + diff --git a/apps/dependencies_chk/css/style.css b/apps/dependencies_chk/css/style.css new file mode 100644 index 0000000000..30f204be7b --- /dev/null +++ b/apps/dependencies_chk/css/style.css @@ -0,0 +1,9 @@ +#status_list legend { font-weight: bold; color: #888888; } +.state > li { margin-bottom: 3px; padding-left: 0.5em; list-style-type: circle; } +.state .state_module { font-weight:bold; text-shadow: 0 1px 0 #DDD; cursor:help;} + +.state_used ul, .state_used li { display:inline; } + +.state_ok .state_module { color: #009700; } +.state_warning .state_module { color: #FF9B29; } +.state_error .state_module { color: #FF3B3B; } diff --git a/apps/dependencies_chk/settings.php b/apps/dependencies_chk/settings.php new file mode 100644 index 0000000000..ca60953215 --- /dev/null +++ b/apps/dependencies_chk/settings.php @@ -0,0 +1,91 @@ +. + * + */ +$l=new OC_L10N('dependencies_chk'); +$tmpl = new OC_Template( 'dependencies_chk', 'settings'); + +$modules = array(); + +//Possible status are : ok, error, warning +$modules[] =array( + 'status' => function_exists('json_encode') ? 'ok' : 'error', + 'part'=> 'php-json', + 'modules'=> array('core'), + 'message'=> $l->t('The php-json module is needed by the many application for inter communications')); + +$modules[] =array( + 'status' => function_exists('curl_init') ? 'ok' : 'error', + 'part'=> 'php-curl', + 'modules'=> array('bookmarks'), + 'message'=> $l->t('The php-curl modude is needed to fetch the page title when adding a bookmarks')); + +$modules[] =array( + 'status' => function_exists('imagepng') ? 'ok' : 'error', + 'part'=> 'php-gd', + 'modules'=> array('gallery'), + 'message'=> $l->t('The php-gd module is needed to create thumbnails of your images')); + +$modules[] =array( + 'status' => OC_Helper::canExecute("mp3info") ? 'ok' : 'warning', + 'part'=> 'mp3info', + 'modules'=> array('media'), + 'message'=> $l->t('The program mp3info is useful to discover ID3 tags of your music files')); + +$modules[] =array( + 'status' => OC_Helper::canExecute("ldap_bind") ? 'ok' : 'error', + 'part'=> 'php-ldap', + 'modules'=> array('user_ldap'), + 'message'=> $l->t('The php-ldap module is needed connect to your ldap server')); + +$modules[] =array( + 'status' => class_exists('ZipArchive') ? 'ok' : 'warning', + 'part'=> 'php-zip', + 'modules'=> array('admin_export','core'), + 'message'=> $l->t('The php-zip module is needed download multiple files at once')); + +$modules[] =array( + 'status' => function_exists('mb_detect_encoding') ? 'ok' : 'error', + 'part'=> 'php-mb_multibyte ', + 'modules'=> array('core'), + 'message'=> $l->t('The php-mb_multibyte module is needed to manage correctly the encoding.')); + +$modules[] =array( + 'status' => function_exists('ctype_digit') ? 'ok' : 'error', + 'part'=> 'php-ctype', + 'modules'=> array('core'), + 'message'=> $l->t('The php-ctype module is needed validate data.')); + + +foreach($modules as $key => $module) { + $enabled = false ; + foreach($module['modules'] as $app) { + if(OC_App::isEnabled($app) || $app=='core'){ + $enabled = true; + } + } + if($enabled == false) unset($modules[$key]); +} + +OC_UTIL::addStyle('dependencies_chk', 'style'); +$tmpl->assign( 'items', $modules ); + +return $tmpl->fetchPage(); diff --git a/apps/dependencies_chk/templates/settings.php b/apps/dependencies_chk/templates/settings.php new file mode 100644 index 0000000000..8ff27ebb18 --- /dev/null +++ b/apps/dependencies_chk/templates/settings.php @@ -0,0 +1,16 @@ +
+ t('Dependencies status');?> + +
\ No newline at end of file