settings.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. /**
  3. * ownCloud - user_ldap
  4. *
  5. * @author Brice Maron
  6. * @copyright 2011 Brice Maron brice __from__ bmaron _DOT_ net
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public
  19. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. $l=OC_L10N::get('admin_dependencies_chk');
  23. $tmpl = new OCP\Template( 'admin_dependencies_chk', 'settings');
  24. $modules = array();
  25. //Possible status are : ok, error, warning
  26. $modules[] =array(
  27. 'status' => function_exists('json_encode') ? 'ok' : 'error',
  28. 'part'=> 'php-json',
  29. 'modules'=> array('core'),
  30. 'message'=> $l->t('The php-json module is needed by the many applications for inter communications'));
  31. $modules[] =array(
  32. 'status' => function_exists('curl_init') ? 'ok' : 'error',
  33. 'part'=> 'php-curl',
  34. 'modules'=> array('bookmarks'),
  35. 'message'=> $l->t('The php-curl modude is needed to fetch the page title when adding a bookmarks'));
  36. $modules[] =array(
  37. 'status' => function_exists('imagepng') ? 'ok' : 'error',
  38. 'part'=> 'php-gd',
  39. 'modules'=> array('gallery'),
  40. 'message'=> $l->t('The php-gd module is needed to create thumbnails of your images'));
  41. $modules[] =array(
  42. 'status' => function_exists("ldap_bind") ? 'ok' : 'error',
  43. 'part'=> 'php-ldap',
  44. 'modules'=> array('user_ldap'),
  45. 'message'=> $l->t('The php-ldap module is needed connect to your ldap server'));
  46. $modules[] =array(
  47. 'status' => class_exists('ZipArchive') ? 'ok' : 'warning',
  48. 'part'=> 'php-zip',
  49. 'modules'=> array('admin_export','core'),
  50. 'message'=> $l->t('The php-zip module is needed download multiple files at once'));
  51. $modules[] =array(
  52. 'status' => function_exists('mb_detect_encoding') ? 'ok' : 'error',
  53. 'part'=> 'php-mb_multibyte ',
  54. 'modules'=> array('core'),
  55. 'message'=> $l->t('The php-mb_multibyte module is needed to manage correctly the encoding.'));
  56. $modules[] =array(
  57. 'status' => function_exists('ctype_digit') ? 'ok' : 'error',
  58. 'part'=> 'php-ctype',
  59. 'modules'=> array('core'),
  60. 'message'=> $l->t('The php-ctype module is needed validate data.'));
  61. $modules[] =array(
  62. 'status' => class_exists('DOMDocument') ? 'ok' : 'error',
  63. 'part'=> 'php-xml',
  64. 'modules'=> array('core'),
  65. 'message'=> $l->t('The php-xml module is needed to share files with webdav.'));
  66. $modules[] =array(
  67. 'status' => ini_get('allow_url_fopen') == '1' ? 'ok' : 'error',
  68. 'part'=> 'allow_url_fopen',
  69. 'modules'=> array('core'),
  70. 'message'=> $l->t('The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers'));
  71. $modules[] =array(
  72. 'status' => class_exists('PDO') ? 'ok' : 'warning',
  73. 'part'=> 'php-pdo',
  74. 'modules'=> array('core'),
  75. 'message'=> $l->t('The php-pdo module is needed to store owncloud data into a database.'));
  76. foreach($modules as $key => $module) {
  77. $enabled = false ;
  78. foreach($module['modules'] as $app) {
  79. if(OCP\App::isEnabled($app) || $app=='core'){
  80. $enabled = true;
  81. }
  82. }
  83. if($enabled == false) unset($modules[$key]);
  84. }
  85. OCP\UTIL::addStyle('admin_dependencies_chk', 'style');
  86. $tmpl->assign( 'items', $modules );
  87. return $tmpl->fetchPage();