From 14c389810d5e6185c5e5c8662857966f9d31e431 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 5 Nov 2015 10:01:13 +0000 Subject: [PATCH] finish merge --- core.php | 28 ---------------------------- settings.fragment.php | 11 +++++++---- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/core.php b/core.php index fd63b01..e45b516 100644 --- a/core.php +++ b/core.php @@ -20,7 +20,6 @@ $paths->searchindex = "invindex.json"; $paths->idindex = "idindex.json"; $paths->upload_file_prefix = "Files/"; - session_start(); ///////// Login System ///////// // Clear expired sessions @@ -262,33 +261,6 @@ function starts_with($haystack, $needle) return (substr($haystack, 0, $length) === $needle); } -/** - * mb_stripos all occurences - * from http://www.pontikis.net/tip/?id=16 - * based on http://www.php.net/manual/en/function.strpos.php#87061 - * - * Find all occurrences of a needle in a haystack (case-insensitive, UTF8) - * - * @param string $haystack - * @param string $needle - * @return array or false - */ -function mb_stripos_all($haystack, $needle) { - $s = 0; $i = 0; - while(is_integer($i)) { - $i = function_exists("mb_stripos") ? mb_stripos($haystack, $needle, $s) : stripos($haystack, $needle, $s); - if(is_integer($i)) { - $aStrPos[] = $i; - $s = $i + (function_exists("mb_strlen") ? mb_strlen($needle) : strlen($needle)); - } - } - - if(isset($aStrPos)) - return $aStrPos; - else - return false; -} - function system_mime_type_extensions() { global $settings; # Returns the system MIME type mapping of MIME types to extensions, as defined in /etc/mime.types (considering the first diff --git a/settings.fragment.php b/settings.fragment.php index fa821dc..9287fe0 100644 --- a/settings.fragment.php +++ b/settings.fragment.php @@ -16,7 +16,7 @@ $settings = new stdClass(); // The site's name. Used all over the place. -// Note that by default the session cookie is perfixed with a variant of the +// Note that by default the session cookie is prefixed with a variant of the // sitename so changing this will log everyone out! $settings->sitename = "Pepperminty Wiki"; @@ -40,6 +40,9 @@ $settings->updateurl = "https://raw.githubusercontent.com/sbrl/pepperminty-wiki/ // and deleting pages. It is strongly advised that you change this! $settings->sitesecret = "ed420502615bac9037f8f12abd4c9f02"; + +$settings->data_storage_dir = "."; + // Determined whether edit is enabled. Set to false to disable disting for all // users (anonymous or otherwise). $settings->editing = true; @@ -131,11 +134,11 @@ $settings->export_allow_only_admins = false; // user-status Expands to the user's login information // e.g. "Logged in as {name}. | Logout". // e.g. "Browsing as Anonymous. | Login". -// +// // search Expands to a search box. -// +// // divider Expands to a divider to separate stuff. -// +// // more Expands to the "More..." submenu. $settings->nav_links = [ "user-status",