|
36 | 36 | $l = \OC::$server->getL10N('user_ldap'); |
37 | 37 |
|
38 | 38 | if(!isset($_POST['action'])) { |
39 | | - \\OC_JSON::error(array('message' => $l->t('No action specified'))); |
| 39 | + \OC_JSON::error(array('message' => $l->t('No action specified'))); |
40 | 40 | } |
41 | 41 | $action = (string)$_POST['action']; |
42 | 42 |
|
43 | 43 |
|
44 | 44 | if(!isset($_POST['ldap_serverconfig_chooser'])) { |
45 | | - \\OC_JSON::error(array('message' => $l->t('No configuration specified'))); |
| 45 | + \OC_JSON::error(array('message' => $l->t('No configuration specified'))); |
46 | 46 | } |
47 | 47 | $prefix = (string)$_POST['ldap_serverconfig_chooser']; |
48 | 48 |
|
|
98 | 98 | exit; |
99 | 99 | } |
100 | 100 | } catch (\Exception $e) { |
101 | | - \\OC_JSON::error(array('message' => $e->getMessage(), 'code' => $e->getCode())); |
| 101 | + \OC_JSON::error(array('message' => $e->getMessage(), 'code' => $e->getCode())); |
102 | 102 | exit; |
103 | 103 | } |
104 | | - \\OC_JSON::error(); |
| 104 | + \OC_JSON::error(); |
105 | 105 | exit; |
106 | 106 | break; |
107 | 107 |
|
|
114 | 114 | exit; |
115 | 115 | } |
116 | 116 | } catch (\Exception $e) { |
117 | | - \\OC_JSON::error(array('message' => $e->getMessage())); |
| 117 | + \OC_JSON::error(array('message' => $e->getMessage())); |
118 | 118 | exit; |
119 | 119 | } |
120 | | - \\OC_JSON::error(); |
| 120 | + \OC_JSON::error(); |
121 | 121 | exit; |
122 | 122 | break; |
123 | 123 | } |
|
126 | 126 | $key = isset($_POST['cfgkey']) ? $_POST['cfgkey'] : false; |
127 | 127 | $val = isset($_POST['cfgval']) ? $_POST['cfgval'] : null; |
128 | 128 | if($key === false || is_null($val)) { |
129 | | - \\OC_JSON::error(array('message' => $l->t('No data specified'))); |
| 129 | + \OC_JSON::error(array('message' => $l->t('No data specified'))); |
130 | 130 | exit; |
131 | 131 | } |
132 | 132 | $cfg = array($key => $val); |
133 | 133 | $setParameters = array(); |
134 | 134 | $configuration->setConfiguration($cfg, $setParameters); |
135 | 135 | if(!in_array($key, $setParameters)) { |
136 | | - \\OC_JSON::error(array('message' => $l->t($key. |
| 136 | + \OC_JSON::error(array('message' => $l->t($key. |
137 | 137 | ' Could not set configuration %s', $setParameters[0]))); |
138 | 138 | exit; |
139 | 139 | } |
|
144 | 144 | \OC_JSON::success(); |
145 | 145 | break; |
146 | 146 | default: |
147 | | - \\OC_JSON::error(array('message' => $l->t('Action does not exist'))); |
| 147 | + \OC_JSON::error(array('message' => $l->t('Action does not exist'))); |
148 | 148 | break; |
149 | 149 | } |
0 commit comments