summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorKo- <k.stoffelen@cs.ru.nl>2017-03-11 17:04:21 +0100
committerKo- <k.stoffelen@cs.ru.nl>2017-03-11 17:04:21 +0100
commit0024b67aaf1b5fd79a2e73789a4c903364162e54 (patch)
treec01ec94b8d871b0905ed550391ac7be5e5b10e52 /lib/base.php
parent801b600ec348edab2447866b349a0d163db94f15 (diff)
downloadnextcloud-server-0024b67aaf1b5fd79a2e73789a4c903364162e54.tar.gz
nextcloud-server-0024b67aaf1b5fd79a2e73789a4c903364162e54.zip
Check that set_time_limit is not disabled before calling it
Signed-off-by: Ko- <k.stoffelen@cs.ru.nl>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 68178b06c5b..04b6d82b1df 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -616,7 +616,9 @@ class OC {
//Let´s try to overwrite some defaults anyway
//try to set the maximum execution time to 60min
- @set_time_limit(3600);
+ if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ @set_time_limit(3600);
+ }
@ini_set('max_execution_time', 3600);
@ini_set('max_input_time', 3600);
g.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php
/**
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 *
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Vincent Petry <pvince81@owncloud.com>
 *
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program 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, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */

$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
// TODO: move this to the generated config.js
$publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes');

$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false);
$isIE = \OCP\Util::isIE();

// renders the controls and table headers template
$tmpl = new OCP\Template('files', 'list', '');

// gridview not available for ie
$tmpl->assign('showgridview', $showgridview && !$isIE);
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
$tmpl->printPage();