mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
finish merge
This commit is contained in:
parent
d12271ac3e
commit
14c389810d
2 changed files with 7 additions and 32 deletions
28
core.php
28
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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue