From 68425f6647461e13d693917b1fbfc6a3f75fff43 Mon Sep 17 00:00:00 2001 From: Astoria Date: Wed, 20 Jul 2022 17:12:14 -0500 Subject: [PATCH] Replace _index.php with index.php --- About/{_index.php => index.php} | 0 Archive/{_index.php => index.php} | 0 Media/{_index.php => index.php} | 0 News/{_index.php => index.php} | 0 includes/archive.php | 2 +- includes/aside.php | 2 +- includes/default-start.php | 4 ++-- includes/formatindex.php | 4 ++-- 8 files changed, 6 insertions(+), 6 deletions(-) rename About/{_index.php => index.php} (100%) rename Archive/{_index.php => index.php} (100%) rename Media/{_index.php => index.php} (100%) rename News/{_index.php => index.php} (100%) diff --git a/About/_index.php b/About/index.php similarity index 100% rename from About/_index.php rename to About/index.php diff --git a/Archive/_index.php b/Archive/index.php similarity index 100% rename from Archive/_index.php rename to Archive/index.php diff --git a/Media/_index.php b/Media/index.php similarity index 100% rename from Media/_index.php rename to Media/index.php diff --git a/News/_index.php b/News/index.php similarity index 100% rename from News/_index.php rename to News/index.php diff --git a/includes/archive.php b/includes/archive.php index c72b67b..34e5a1d 100644 --- a/includes/archive.php +++ b/includes/archive.php @@ -29,7 +29,7 @@ function archive ($includearr) { $mod = $post[1]; $title = file_get_contents($link); $linkarr = explode("/", $link); - $linkarr[sizeof($linkarr) - 1] = "_index.php?post=" . $linkarr[sizeof($linkarr) - 1]; + $linkarr[sizeof($linkarr) - 1] = "index.php?post=" . $linkarr[sizeof($linkarr) - 1]; $link = implode("/", $linkarr); $title = explode('

', $title)[1]; $title = explode(''; echo '
'; if (basename($_SERVER['PHP_SELF']) == "home.php") { require "homepanel.php"; - } elseif (basename($_SERVER['PHP_SELF']) == "_index.php") { + } elseif (basename($_SERVER['PHP_SELF']) == "index.php") { require "blogpanel.php"; } ?> diff --git a/includes/formatindex.php b/includes/formatindex.php index d999662..145df99 100644 --- a/includes/formatindex.php +++ b/includes/formatindex.php @@ -5,8 +5,8 @@ $check = preg_replace('/^\.$/', '', $files); //remove . $check = preg_replace('/^\.\.$/', '', $check); //remove .. -$check = preg_replace('/^\_index\.php$/', '', $check); -//remove _index.php +$check = preg_replace('/^index\.php$/', '', $check); +//remove index.php $check = implode(" ", $check); if (preg_match("/\.+/", $check) == 0) { require "article-start.php";