You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @license GNU AGPL version 3 or any later version
11
+
*
12
+
* This program is free software: you can redistribute it and/or modify
13
+
* it under the terms of the GNU Affero General Public License as
14
+
* published by the Free Software Foundation, either version 3 of the
15
+
* License, or (at your option) any later version.
16
+
*
17
+
* This program is distributed in the hope that it will be useful,
18
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+
* GNU Affero General Public License for more details.
21
+
*
22
+
* You should have received a copy of the GNU Affero General Public License
23
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+
*
25
+
*/
26
+
namespaceOCA\Settings\SetupChecks;
27
+
28
+
useOCP\IL10N;
29
+
useOCP\SetupCheck\ISetupCheck;
30
+
useOCP\SetupCheck\SetupResult;
31
+
32
+
class PhpDisabledFunctions implements ISetupCheck {
33
+
34
+
publicfunction__construct(
35
+
privateIL10N$l10n,
36
+
) {
37
+
}
38
+
39
+
publicfunctiongetName(): string {
40
+
return$this->l10n->t('PHP set_time_limit');
41
+
}
42
+
43
+
publicfunctiongetCategory(): string {
44
+
return'php';
45
+
}
46
+
47
+
publicfunctionrun(): SetupResult {
48
+
if (function_exists('set_time_limit') && !str_contains(ini_get('disable_functions'), 'set_time_limit')) {
49
+
return SetupResult::success($this->l10n->t('The function is available.'));
50
+
} else {
51
+
return SetupResult::warning(
52
+
$this->l10n->t('The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.'),
Copy file name to clipboardExpand all lines: core/js/setupchecks.js
-6Lines changed: 0 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -188,12 +188,6 @@
188
188
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
189
189
});
190
190
}
191
-
if(!data.isSettimelimitAvailable){
192
-
messages.push({
193
-
msg: t('core','The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.'),
msg: 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.',
366
-
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
367
-
}]);
368
-
done();
369
-
});
370
-
});
371
-
372
331
it('should return a warning if the memory limit is below the recommended value',function(done){
0 commit comments