Blame view

sources/apps/admin_dependencies_chk/settings.php 3.75 KB
03e52840d   Kload   Init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
  <?php
  
  /**
   * ownCloud - user_ldap
   *
   * @author Brice Maron
   * @copyright 2011 Brice Maron brice __from__ bmaron _DOT_ net
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
   * License as published by the Free Software Foundation; either
   * version 3 of the License, or any later version.
   *
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
   *
   * You should have received a copy of the GNU Affero General Public
   * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
   *
   */
  $l=OC_L10N::get('admin_dependencies_chk');
  $tmpl = new OCP\Template( 'admin_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 applications for inter communications'));
  
  $modules[] =array(
  	'status' => function_exists('curl_init') ? 'ok' : 'error',
  	'part'=> 'php-curl',
  	'modules'=> array('bookmarks'),
  	'message'=> $l->t('The php-curl module is needed to fetch the page title when adding a bookmark'));
  
  $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' => function_exists("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.'));
  
  $modules[] =array(
  	'status' => class_exists('DOMDocument') ? 'ok' : 'error',
  	'part'=> 'php-xml',
  	'modules'=> array('core'),
  	'message'=> $l->t('The php-xml module is needed to share files with webdav.'));
  
  $modules[] =array(
  	'status' => ini_get('allow_url_fopen') == '1' ? 'ok' : 'error',
  	'part'=> 'allow_url_fopen',
  	'modules'=> array('core'),
  	'message'=> $l->t('The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers'));
  
  $modules[] =array(
  	'status' => class_exists('PDO') ? 'ok' : 'warning',
  	'part'=> 'php-pdo',
  	'modules'=> array('core'),
  	'message'=> $l->t('The php-pdo module is needed to store owncloud data into a database.'));
  
  $modules[] =array(
  	'status' => function_exists('iconv') ? 'ok' : 'error',
  	'part'=> 'php-iconv',
  	'modules'=> array('files_texteditor','news','contacts'),
  	'message'=> $l->t('The iconv module is needed to convert data into the correct charset.'));
  
  foreach($modules as $key => $module) {
  	$enabled = false ;
  	foreach($module['modules'] as $app) {
  		if(OCP\App::isEnabled($app) || $app=='core') {
  				$enabled = true;
  		}
  	}
  	if($enabled == false) unset($modules[$key]);
  }
  
  OCP\UTIL::addStyle('admin_dependencies_chk', 'style');
  $tmpl->assign( 'items', $modules );
  
  return $tmpl->fetchPage();