mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +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->idindex = "idindex.json";
|
||||||
$paths->upload_file_prefix = "Files/";
|
$paths->upload_file_prefix = "Files/";
|
||||||
|
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
///////// Login System /////////
|
///////// Login System /////////
|
||||||
// Clear expired sessions
|
// Clear expired sessions
|
||||||
|
@ -262,33 +261,6 @@ function starts_with($haystack, $needle)
|
||||||
return (substr($haystack, 0, $length) === $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() {
|
function system_mime_type_extensions() {
|
||||||
global $settings;
|
global $settings;
|
||||||
# Returns the system MIME type mapping of MIME types to extensions, as defined in /etc/mime.types (considering the first
|
# 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();
|
$settings = new stdClass();
|
||||||
|
|
||||||
// The site's name. Used all over the place.
|
// 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!
|
// sitename so changing this will log everyone out!
|
||||||
$settings->sitename = "Pepperminty Wiki";
|
$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!
|
// and deleting pages. It is strongly advised that you change this!
|
||||||
$settings->sitesecret = "ed420502615bac9037f8f12abd4c9f02";
|
$settings->sitesecret = "ed420502615bac9037f8f12abd4c9f02";
|
||||||
|
|
||||||
|
|
||||||
|
$settings->data_storage_dir = ".";
|
||||||
|
|
||||||
// Determined whether edit is enabled. Set to false to disable disting for all
|
// Determined whether edit is enabled. Set to false to disable disting for all
|
||||||
// users (anonymous or otherwise).
|
// users (anonymous or otherwise).
|
||||||
$settings->editing = true;
|
$settings->editing = true;
|
||||||
|
|
Loading…
Reference in a new issue