aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/index.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2023-08-30 14:48:22 +0200
committerAndreas Gohr <andi@splitbrain.org>2023-08-30 14:48:22 +0200
commitb1f206e1d439d693686c99955ab305e7ca94e760 (patch)
tree67eb5e7400fb7fffd6fd6b5f277b4a5680ca0a11 /index.php
parentbf9be0e3945b81d0a5a9d209dfda78418b12f64b (diff)
downloaddokuwiki-b1f206e1d439d693686c99955ab305e7ca94e760.tar.gz
dokuwiki-b1f206e1d439d693686c99955ab305e7ca94e760.zip
Apply rector fixes to bin and toplevel
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.php b/index.php
index 9ff139a00..169d224c3 100644
--- a/index.php
+++ b/index.php
@@ -13,8 +13,8 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <andi@splitbrain.org>
*/
-if (php_sapi_name() != 'cli-server') {
- if (!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/');
+if (PHP_SAPI != 'cli-server') {
+ if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/');
require_once(DOKU_INC . 'inc/init.php');
send_redirect(wl($conf['start']));
@@ -49,7 +49,8 @@ if (preg_match('/^\/_media\/(.*)/', $_SERVER['SCRIPT_NAME'], $m)) {
// existing files
// access limitiations
- if (preg_match('/\/([._]ht|README$|VERSION$|COPYING$)/', $_SERVER['SCRIPT_NAME']) or
+ if (
+ preg_match('/\/([._]ht|README$|VERSION$|COPYING$)/', $_SERVER['SCRIPT_NAME']) ||
preg_match('/^\/(data|conf|bin|inc)\//', $_SERVER['SCRIPT_NAME'])
) {
header('HTTP/1.1 403 Forbidden');