mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-23 16:53:00 +00:00
Seriously reorganise stuff. Much tidier :D
This commit is contained in:
parent
905e970dc0
commit
ca68989bb7
90 changed files with 7538 additions and 4486 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "lantern-build-engine"]
|
||||||
|
path = lantern-build-engine
|
||||||
|
url = https://gitlab.com/sbrl/lantern-build-engine.git
|
32
Makefile
32
Makefile
|
@ -1,32 +0,0 @@
|
||||||
.DEFAULT_GOAL := peppermint
|
|
||||||
|
|
||||||
.PHONY: setupApiDoc peppermint docs rest_docs module_api_docs
|
|
||||||
|
|
||||||
ApiDocPresent := $(shell sh -c apidoc --help 1\>/dev/null && rm -rf doc/)
|
|
||||||
|
|
||||||
peppermint:
|
|
||||||
@echo [peppermint/build] Rebuilding Pepperminty Wiki
|
|
||||||
php build.php
|
|
||||||
|
|
||||||
docs: rest_docs module_api_docs
|
|
||||||
|
|
||||||
rest_docs: setupApiDoc
|
|
||||||
@echo [peppermint/docs] Building docs
|
|
||||||
apidoc -o './docs/RestApi/' --config apidoc.json -f '.*\.php' -e 'index.php|ModuleApi'
|
|
||||||
rm -rf doc/
|
|
||||||
|
|
||||||
module_api_docs: phpdoc
|
|
||||||
@echo [peppermint/module api docs] Updating module api docs
|
|
||||||
php phpdoc run --directory . --target docs/ModuleApi --cache-folder docs/ModuleApiCache --ignore build/,php_error.php,Parsedown*,*.html --title "Pepperminty Wiki Module API" --visibility public
|
|
||||||
|
|
||||||
phpdoc:
|
|
||||||
curl -L https://phpdoc.org/phpDocumentor.phar -o phpdoc
|
|
||||||
|
|
||||||
setupApiDoc:
|
|
||||||
@echo [peppermint] Checking for apiDoc
|
|
||||||
ifndef ApiDocPresent
|
|
||||||
@echo [peppermint] Attempting to install ApiDoc, since it wasn't detected in your PATH
|
|
||||||
@echo [peppermint] Note that you may need to be root, and you'll need npm installed.
|
|
||||||
npm install apidoc --global
|
|
||||||
endif
|
|
||||||
@echo [peppermint] Check complete
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Pepperminty Wiki",
|
"name": "Pepperminty Wiki",
|
||||||
"version": "0.13.0",
|
"version": "0.17.1",
|
||||||
"description": "A wiki in a box. This is the API documentation.",
|
"description": "A wiki in a box. This is the API documentation.",
|
||||||
"title": "Pepperminty Wiki (0.13-dev)"
|
"title": "Pepperminty Wiki (0.13-dev)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
@echo off
|
|
||||||
php build.php %*
|
|
147
build.sh
147
build.sh
|
@ -1,2 +1,147 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
php build.php $*
|
# Make sure the current directory is the location of this script to simplify matters
|
||||||
|
cd "$(dirname $(readlink -f $0))";
|
||||||
|
################
|
||||||
|
### Settings ###
|
||||||
|
################
|
||||||
|
|
||||||
|
# The name of this project
|
||||||
|
project_name="Pepperminty Wiki";
|
||||||
|
|
||||||
|
# The path to the lantern build engine git submodule
|
||||||
|
lantern_path="./lantern-build-engine";
|
||||||
|
|
||||||
|
###
|
||||||
|
# Custom Settings
|
||||||
|
###
|
||||||
|
|
||||||
|
# Put any custom settings here.
|
||||||
|
|
||||||
|
# The file to store the development server's PID in.
|
||||||
|
server_pid_file="/tmp/pepperminty-wiki-dev-server.pid";
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Check out the lantern git submodule if needed
|
||||||
|
if [ ! -d "${lantern_path}" ]; then git submodule update --init "${lantern_path}"; fi
|
||||||
|
|
||||||
|
source "${lantern_path}/lantern.sh";
|
||||||
|
|
||||||
|
if [[ "$#" -lt 1 ]]; then
|
||||||
|
echo -e "${FBLE}${project_name}${RS} build script";
|
||||||
|
echo -e " by Starbeamrainbowlabs";
|
||||||
|
echo -e "${LC}Powered by the lantern build engine, v${version}${RS}";
|
||||||
|
echo -e "";
|
||||||
|
echo -e "${CSECTION}Usage${RS}";
|
||||||
|
echo -e " ./build ${CTOKEN}{action}${RS} ${CTOKEN}{action}${RS} ${CTOKEN}{action}${RS} ...";
|
||||||
|
echo -e "";
|
||||||
|
echo -e "${CSECTION}Available actions${RS}";
|
||||||
|
echo -e " ${CACTION}setup${RS} - Perform initial setup, check the environment (skip if only building Pepperminty Wiki itself)";
|
||||||
|
echo -e " ${CACTION}build${RS} - Build Pepperminty Wiki";
|
||||||
|
echo -e " ${CACTION}docs${RS} - Build the documentation";
|
||||||
|
echo -e " ${CACTION}docs-livereload${RS} - Start the documentation livereload server";
|
||||||
|
echo -e " ${CACTION}start-server${RS} - Start a development server";
|
||||||
|
echo -e " ${CACTION}stop-server${RS} - Stop the development server";
|
||||||
|
echo -e "";
|
||||||
|
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
function task_setup {
|
||||||
|
task_begin "Checking Environment";
|
||||||
|
|
||||||
|
check_command git true;
|
||||||
|
check_command npm true;
|
||||||
|
check_command npm true;
|
||||||
|
|
||||||
|
task_end $?;
|
||||||
|
|
||||||
|
task_begin "Initialising submodules";
|
||||||
|
git submodule update --init;
|
||||||
|
task_end $?;
|
||||||
|
|
||||||
|
task_begin "Installing packages";
|
||||||
|
npm install;
|
||||||
|
task_end $?;
|
||||||
|
|
||||||
|
task_begin "Creating build folders";
|
||||||
|
mkdir -p build/_tmp;
|
||||||
|
echo "This folder contains build tools automatically downloaded." >build/_tmp/README.txt;
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_build {
|
||||||
|
if [ -f "./build/index.php" ]; then
|
||||||
|
task_begin "Deleting old build result";
|
||||||
|
rm build/index.php;
|
||||||
|
task_end "$?";
|
||||||
|
fi
|
||||||
|
|
||||||
|
task_begin "Building";
|
||||||
|
php build.php
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_docs {
|
||||||
|
task_begin "Building HTTP API Docs";
|
||||||
|
node_modules/apidoc/bin/apidoc -o './docs/RestApi/' --config apidoc.json -f '.*\.php' -e 'index.php|ModuleApi'
|
||||||
|
exit_code="$?";
|
||||||
|
rm -rf doc/;
|
||||||
|
task_end "${exit_code}";
|
||||||
|
|
||||||
|
task_begin "Building PHP Module API Docs";
|
||||||
|
if [ ! -f "./build/_tmp/phpdoc" ]; then
|
||||||
|
subtask_begin "Downloading PHPDoc";
|
||||||
|
curl -sSL https://phpdoc.org/phpDocumentor.phar -o ./build/_tmp/phpdoc
|
||||||
|
subtask_end $?;
|
||||||
|
fi
|
||||||
|
|
||||||
|
php ./build/_tmp/phpdoc run \
|
||||||
|
--directory . \
|
||||||
|
--target docs/ModuleApi\
|
||||||
|
--cache-folder docs/ModuleApiCache \
|
||||||
|
--ignore build/,php_error.php,Parsedown*,*.html \
|
||||||
|
--title "Pepperminty Wiki Module API" \
|
||||||
|
--visibility public;
|
||||||
|
task_end $?;
|
||||||
|
|
||||||
|
task_begin "Building Main Documentation";
|
||||||
|
node_modules/docpress/bin/docpress build;
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_docs-livereload {
|
||||||
|
task_begin "Starting Livereload Documentation Server";
|
||||||
|
node_modules/docpress/bin/docpress serve;
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_start-server {
|
||||||
|
task_begin "Starting Server";
|
||||||
|
if [ -f "${server_pid_file}" ]; then
|
||||||
|
echo -e "${FRED}${HC}Error: A development server appears to be running already. Try running the 'stop-server' task before starting it again.${RS}";
|
||||||
|
task_end 1;
|
||||||
|
fi
|
||||||
|
php -S [::]:35623 -t build/ &
|
||||||
|
exit_code=$?; pid=$!;
|
||||||
|
echo "${pid}" >"${server_pid_file}";
|
||||||
|
task_end "${exit_code}";
|
||||||
|
|
||||||
|
task_begin "Opening Browser";
|
||||||
|
sensible-browser [::]:35623;
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_stop-server {
|
||||||
|
task_begin "Stopping Server";
|
||||||
|
|
||||||
|
kill "$(cat "${server_pid_file}")";
|
||||||
|
rm "${server_pid_file}";
|
||||||
|
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
tasks_run $@;
|
||||||
|
|
3740
build/index.php
3740
build/index.php
File diff suppressed because it is too large
Load diff
|
@ -20,22 +20,24 @@ Pepperminty Wiki has a downloader that you can use to select the modules you wan
|
||||||
You can also you the downloader offline. Simply clone this repository to your web server and then point your web browser at `your.server.com/path/to/pepperminty/wiki/download.php`.
|
You can also you the downloader offline. Simply clone this repository to your web server and then point your web browser at `your.server.com/path/to/pepperminty/wiki/download.php`.
|
||||||
|
|
||||||
## Method 4: Building from source
|
## Method 4: Building from source
|
||||||
Pepperminty Wiki can also be built from source (and I do this all the time when testing). Start by cloning the repository. Then go into the `modules` folder and append `.disabled` to the names of any modules you don't want to be included (e.g. `modules/page-edit.php` would become `modules/page-edit.php.disabled`). Then follow the instructions for your platform below. The resulting file will be located at `build/index.php`.
|
Pepperminty Wiki can also be built from source (and I do this all the time when testing). Start by cloning the repository. Then go into the `modules` folder and append `.disabled` to the names of any modules you don't want to be included (e.g. `modules/page-edit.php` would become `modules/page-edit.php.disabled`). Then follow the instructions below. The resulting file will be located at `build/index.php`.
|
||||||
|
|
||||||
### Windows
|
Run the following commands from the root of the repository in order, adjusting them for your specific platform if required:
|
||||||
Simply run the `build.bat` script in the root of the repository. It will handle everything for you.
|
|
||||||
|
|
||||||
### Linux and Everyone Else
|
|
||||||
Run the following commands from the root of the repository in order, adjusting them for your specific platform (these are for a standard Ubuntu Server install):
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rm build/index.php
|
rm build/index.php
|
||||||
php rebuild_module_index.php
|
|
||||||
php build.php
|
php build.php
|
||||||
```
|
```
|
||||||
|
|
||||||
These commands are also in `build.sh`. You can run that if you want. Here's an explanation of what each command does:
|
These commands are also in `build.sh`. If you have bash installed (i.e. Linux and macOS users), you can run that instead like this:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./build.sh build
|
||||||
|
```
|
||||||
|
|
||||||
|
The extra `build` is because the build script can do other things. Omit the `build` for a full list of tricks it has up its sleeve :D
|
||||||
|
|
||||||
|
Here's an explanation of what each command does:
|
||||||
|
|
||||||
1. Deletes the old `index.php` in the build folder that comes with the repository
|
1. Deletes the old `index.php` in the build folder that comes with the repository
|
||||||
2. Rebuilds the module index that the build scripts uses to determine what modules it should include when building
|
2. Rebuilds the module index that the build scripts uses to determine what modules it should include when building, and then actually builds Pepperminty Wiki. Outputs to `index.php`.
|
||||||
3. Actually builds Pepperminty Wiki. Outputs to `index.php`.
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
The core of Pepperminty Wiki exposes several global objects, classes, functions, and miscellaneous files that you can use to write your own modules. This page documents these them so that you can create your own modules more easily.
|
The core of Pepperminty Wiki exposes several global objects, classes, functions, and miscellaneous files that you can use to write your own modules. This page documents these them so that you can create your own modules more easily.
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
- [Rest API](#rest-api)
|
- [HTTP API](#http-api)
|
||||||
- [Module API](#module-api)
|
- [Module API](#module-api)
|
||||||
- [Global Variables](#global-variables)
|
- [Global Variables](#global-variables)
|
||||||
- [Files](#files)
|
- [Files](#files)
|
||||||
|
@ -12,11 +12,11 @@ The core of Pepperminty Wiki exposes several global objects, classes, functions,
|
||||||
- [`recent-changes.json`](#recent-changesjson)
|
- [`recent-changes.json`](#recent-changesjson)
|
||||||
- [`statsindex.json`](#statsindexjson)
|
- [`statsindex.json`](#statsindexjson)
|
||||||
|
|
||||||
## Rest API
|
## HTTP API
|
||||||
The REST api provided by Pepperminty Wiki itself is documented for bot owners and software developers alike over on GitHub pages [here](https://sbrl.github.io/Pepperminty-Wiki/docs/RestApi/).
|
The HTTP API provided by Pepperminty Wiki itself is documented for bot owners and software developers alike. Find it via the _HTTP API_ section in the sidebar of this page.
|
||||||
|
|
||||||
## Module API
|
## Module API
|
||||||
The main PHP-based module API is documented with php documentor. The docs can be found [here](https://sbrl.github.io/Pepperminty-Wiki/docs/ModuleApi/), hosted on GitHub Pages.
|
The main PHP-based module API is documented with _PHPDoc_. It can be found via the _PHP Module API_ section in the sidebar of this page.
|
||||||
|
|
||||||
This documentation covers all the functions and classes available in both the Pepperminty Wiki core, and the modules stored in this repository - as well as mentioning which module they are a part of.
|
This documentation covers all the functions and classes available in both the Pepperminty Wiki core, and the modules stored in this repository - as well as mentioning which module they are a part of.
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
# Development Notes
|
# Making a Release
|
||||||
This page contains a few notes about Pepperminty Wiki development. These notes are intended to remind me of things I need to do, but you may find them useful.
|
This page contains a few notes about making a release of Pepperminty Wiki. These notes are intended to remind me of things I need to do, but you may find them useful.
|
||||||
|
|
||||||
## Preparing for a release
|
|
||||||
The following things need to be done to prepare for a release:
|
The following things need to be done to prepare for a release:
|
||||||
|
|
||||||
- Check for outstanding issues
|
- Check for outstanding issues
|
||||||
- Check the changelog
|
- Check the changelog
|
||||||
- Make sure that the README is up to date
|
- Make sure that the README is up to date
|
||||||
- Make sure that Pepperminty Wiki actually works
|
- Make sure that Pepperminty Wiki actually works
|
||||||
- Bump the version
|
- Bump the version:
|
||||||
|
- In the `version` file
|
||||||
|
- In the changelog
|
||||||
|
- In `apidoc.json` (TODO: Automate this?)
|
||||||
|
- In the README.md (TODO: Automate this?)
|
||||||
- (Stable releases only) Pull down changes to update online downloader at starbeamrainbowlabs.com/labs/peppermint/download.php
|
- (Stable releases only) Pull down changes to update online downloader at starbeamrainbowlabs.com/labs/peppermint/download.php
|
||||||
- Update wikimatrix
|
- Update wikimatrix
|
||||||
- Write & publish the release
|
- Write & publish the release
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-50850467"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1217283171"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-50850467" class="accordion-body collapse in">
|
<div id="namespace-1217283171" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ with a URL encoded version of the page name.</em></p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-992366407"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1482969679"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-992366407" class="accordion-body collapse in">
|
<div id="namespace-1482969679" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ Added image support</p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2127223150"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-778800744"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-2127223150" class="accordion-body collapse in">
|
<div id="namespace-778800744" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ index.</p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-855065177"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-369263126"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-855065177" class="accordion-body collapse in">
|
<div id="namespace-369263126" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -190,10 +190,13 @@
|
||||||
<a href="../classes/page_renderer.html#method_render" class="">render()</a><br />
|
<a href="../classes/page_renderer.html#method_render" class="">render()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_render_main" class="">render_main()</a><br />
|
<a href="../classes/page_renderer.html#method_render_main" class="">render_main()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_render_minimal" class="">render_minimal()</a><br />
|
<a href="../classes/page_renderer.html#method_render_minimal" class="">render_minimal()</a><br />
|
||||||
|
<a href="../classes/page_renderer.html#method_send_server_push_indicators" class="">send_server_push_indicators()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_get_header_html" class="">get_header_html()</a><br />
|
<a href="../classes/page_renderer.html#method_get_header_html" class="">get_header_html()</a><br />
|
||||||
|
<a href="../classes/page_renderer.html#method_is_css_url" class="">is_css_url()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_get_css_as_html" class="">get_css_as_html()</a><br />
|
<a href="../classes/page_renderer.html#method_get_css_as_html" class="">get_css_as_html()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_AddJSLink" class="">AddJSLink()</a><br />
|
<a href="../classes/page_renderer.html#method_AddJSLink" class="">AddJSLink()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_AddJSSnippet" class="">AddJSSnippet()</a><br />
|
<a href="../classes/page_renderer.html#method_AddJSSnippet" class="">AddJSSnippet()</a><br />
|
||||||
|
<a href="../classes/page_renderer.html#method_AddServerPushIndicator" class="">AddServerPushIndicator()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_render_navigation_bar" class="">render_navigation_bar()</a><br />
|
<a href="../classes/page_renderer.html#method_render_navigation_bar" class="">render_navigation_bar()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_render_username" class="">render_username()</a><br />
|
<a href="../classes/page_renderer.html#method_render_username" class="">render_username()</a><br />
|
||||||
<a href="../classes/page_renderer.html#method_generate_all_pages_datalist" class="">generate_all_pages_datalist()</a><br />
|
<a href="../classes/page_renderer.html#method_generate_all_pages_datalist" class="">generate_all_pages_datalist()</a><br />
|
||||||
|
@ -335,7 +338,7 @@
|
||||||
<h3 class="public ">$minimal_content_template</h3>
|
<h3 class="public ">$minimal_content_template</h3>
|
||||||
<pre class="signature">$minimal_content_template : string</pre>
|
<pre class="signature">$minimal_content_template : string</pre>
|
||||||
<p><em>A specially minified content template that doesn't include the navbar and
|
<p><em>A specially minified content template that doesn't include the navbar and
|
||||||
other elements not suiltable for printing.</em></p>
|
other elements not suitable for printing.</em></p>
|
||||||
|
|
||||||
|
|
||||||
<h4>Type</h4>
|
<h4>Type</h4>
|
||||||
|
@ -603,6 +606,36 @@ value of the function passed is discarded.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_send_server_push_indicators" name="method_send_server_push_indicators" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class="public ">send_server_push_indicators()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">send_server_push_indicators() : integer|FALSE</pre>
|
||||||
|
<p><em>Sends the currently registered HTTP2 server push items to the client.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
integer|FALSE
|
||||||
|
— <p>The number of resource hints included in the link: header, or false if server pushing is disabled.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<span class="label label-info">static</span>
|
||||||
|
<dl>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr><td colspan="2"><em>None found</em></td></tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_get_header_html" name="method_get_header_html" class="anchor"></a>
|
<a id="method_get_header_html" name="method_get_header_html" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class="public ">get_header_html()</h3>
|
<h3 class="public ">get_header_html()</h3>
|
||||||
|
@ -640,6 +673,36 @@ value of the function passed is discarded.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_is_css_url" name="method_is_css_url" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class="public ">is_css_url()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">is_css_url() : boolean</pre>
|
||||||
|
<p><em>Figures out whether $settings->css is a url, or a string of css.</em></p>
|
||||||
|
<p>A url is something starting with "protocol://" or simply a "/".</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>True if it's a url - false if we assume it's a string of css.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<span class="label label-info">static</span>
|
||||||
|
<dl>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr><td colspan="2"><em>None found</em></td></tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_get_css_as_html" name="method_get_css_as_html" class="anchor"></a>
|
<a id="method_get_css_as_html" name="method_get_css_as_html" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class="public ">get_css_as_html()</h3>
|
<h3 class="public ">get_css_as_html()</h3>
|
||||||
|
@ -759,6 +822,46 @@ value of the function passed is discarded.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_AddServerPushIndicator" name="method_AddServerPushIndicator" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class="public ">AddServerPushIndicator()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">AddServerPushIndicator(string <span class="argument">$type</span>, string <span class="argument">$path</span>) </pre>
|
||||||
|
<p><em>Adds a resource to the list of items to indicate that the web server should send via HTTP/2.0 Server Push.</em></p>
|
||||||
|
<p>Note: Only specify static files here, as you might end up with strange (and possibly dangerous) results!</p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$type </td>
|
||||||
|
<td><p>The resource type. See <a href="https://fetch.spec.whatwg.org/#concept-request-destination">https://fetch.spec.whatwg.org/#concept-request-destination</a> for more information.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$path </td>
|
||||||
|
<td><p>The <em>relative url path</em> to the resource.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<span class="label label-info">static</span>
|
||||||
|
<dl>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr><td colspan="2"><em>None found</em></td></tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_render_navigation_bar" name="method_render_navigation_bar" class="anchor"></a>
|
<a id="method_render_navigation_bar" name="method_render_navigation_bar" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class="public ">render_navigation_bar()</h3>
|
<h3 class="public ">render_navigation_bar()</h3>
|
||||||
|
@ -943,7 +1046,7 @@ navigation bar.</p></td>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-25777709"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-616725782"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-25777709" class="accordion-body collapse in">
|
<div id="namespace-616725782" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ merged into an inverted index.</em></p>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class="public ">tokenize()</h3>
|
<h3 class="public ">tokenize()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">tokenize(string <span class="argument">$source</span>) : array</pre>
|
<pre class="signature" style="margin-right: 54px;">tokenize(string <span class="argument">$source</span>, boolean <span class="argument">$capture_offsets = false</span>) : array</pre>
|
||||||
<p><em>Converts a source string into a series of raw tokens.</em></p>
|
<p><em>Converts a source string into a series of raw tokens.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
@ -352,6 +352,11 @@ merged into an inverted index.</em></p>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
<td>$source </td>
|
<td>$source </td>
|
||||||
<td><p>The source string to process.</p></td>
|
<td><p>The source string to process.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>$capture_offsets </td>
|
||||||
|
<td><p>Whether to capture & return the character offsets of the tokens detected. If true, then each token returned will be an array in the form [ token, char_offset ].</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -789,7 +794,7 @@ sequential search.</p>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class="public ">extract_context()</h3>
|
<h3 class="public ">extract_context()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">extract_context(string <span class="argument">$query</span>, string <span class="argument">$source</span>) : string</pre>
|
<pre class="signature" style="margin-right: 54px;">extract_context(string <span class="argument">$invindex</span>, string <span class="argument">$pagename</span>, string <span class="argument">$query</span>, string <span class="argument">$source</span>) : string</pre>
|
||||||
<p><em>Extracts a context string (in HTML) given a search query that could be displayed
|
<p><em>Extracts a context string (in HTML) given a search query that could be displayed
|
||||||
in a list of search results.</em></p>
|
in a list of search results.</em></p>
|
||||||
|
|
||||||
|
@ -798,6 +803,16 @@ in a list of search results.</em></p>
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
|
<td>$invindex </td>
|
||||||
|
<td><p>The inverted index to consult.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pagename </td>
|
||||||
|
<td><p>The name of the paget that this source belongs to. Used when consulting the inverted index.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
<td>$query </td>
|
<td>$query </td>
|
||||||
<td><p>The search queary to generate the context for.</p></td>
|
<td><p>The search queary to generate the context for.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -919,7 +934,7 @@ in a list of search results.</em></p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1718878422"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-96068186"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1718878422" class="accordion-body collapse in">
|
<div id="namespace-96068186" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -784,7 +784,7 @@ dashes.</p>
|
||||||
todo
|
todo
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<p>Make this moree clevererer :D</p>
|
<p>Make this more clevererer :D</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1614,12 +1614,50 @@ don't have it.</em></p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_save_settings" name="method_save_settings" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">save_settings()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">save_settings() : boolean</pre>
|
||||||
|
<p><em>Saves the settings file back to peppermint.json.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>Whether the settings were saved successfully.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">core.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
|
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">save_userdata()</h3>
|
<h3 class=" ">save_userdata()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
|
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
|
||||||
<p><em>Saves the currently logged in uesr's data back to peppermint.json.</em></p>
|
<p><em>Saves the currently logged in user's data back to peppermint.json.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2433,7 +2471,7 @@ an edit is saved.</em></p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-755251852"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2093199389"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-755251852" class="accordion-body collapse in">
|
<div id="namespace-2093199389" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,94 +1,94 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Pepperminty Wiki Download</title>
|
<title>Pepperminty Wiki Download</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> Pepperminty Wiki Downloader</h1>
|
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> Pepperminty Wiki Downloader</h1>
|
||||||
|
|
||||||
<!-------------->
|
<!-------------->
|
||||||
<h2>Module selector</h2>
|
<h2>Module selector</h2>
|
||||||
<p>Choose the modules that you want to include in your installation of Pepperminty Wiki <?php echo(trim(file_get_contents("version"))); ?>.</p>
|
<p>Choose the modules that you want to include in your installation of Pepperminty Wiki <?php echo(trim(file_get_contents("version"))); ?>.</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button onclick="select(true);">Select All</button>
|
<button onclick="select(true);">Select All</button>
|
||||||
<button onclick="select(false);">Select None</button>
|
<button onclick="select(false);">Select None</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Author</th>
|
<th>Author</th>
|
||||||
<th>Version</th>
|
<th>Version</th>
|
||||||
<th style="width: 9rem;">Last Updated</th>
|
<th style="width: 9rem;">Last Updated</th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$module_index = json_decode(file_get_contents("module_index.json"));
|
$module_index = json_decode(file_get_contents("module_index.json"));
|
||||||
foreach($module_index as $module)
|
foreach($module_index as $module)
|
||||||
{
|
{
|
||||||
$checkedText = (isset($module->optional) && $module->optional === true) ? "" : " checked";
|
$checkedText = (isset($module->optional) && $module->optional === true) ? "" : " checked";
|
||||||
echo("<tr>
|
echo("<tr>
|
||||||
<td><input type='checkbox' id='$module->id'$checkedText /></td>
|
<td><input type='checkbox' id='$module->id'$checkedText /></td>
|
||||||
<td><label for='$module->id'>$module->name</label></td>
|
<td><label for='$module->id'>$module->name</label></td>
|
||||||
<td>$module->description</td>
|
<td>$module->description</td>
|
||||||
<td>$module->author</td>
|
<td>$module->author</td>
|
||||||
<td>$module->version</td>
|
<td>$module->version</td>
|
||||||
<td>" . date("D jS M Y", $module->lastupdate) . "</td>
|
<td>" . date("D jS M Y", $module->lastupdate) . "</td>
|
||||||
</tr>");
|
</tr>");
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<button onclick="download()" class="largebutton">Download</button>
|
<button onclick="download()" class="largebutton">Download</button>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Pepperminty Wiki was built by <a href="https://starbeamrainbowlabs.com/"><img src="https://starbeamrainbowlabs.com/images/sbrl/SBRL-Small-64.png" class="logo" /> Starbeamrainbowlabs</a>. The code is available on <a href="//github.com/sbrl/pepperminty-wiki">GitHub</a>.
|
Pepperminty Wiki was built by <a href="https://starbeamrainbowlabs.com/"><img src="https://starbeamrainbowlabs.com/images/sbrl/SBRL-Small-64.png" class="logo" /> Starbeamrainbowlabs</a>. The code is available on <a href="//github.com/sbrl/pepperminty-wiki">GitHub</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Other contributors: <a href="https://github.com/ikisler"><img src="https://avatars2.githubusercontent.com/u/12506147?v=3&s=32" class="logo" /> @ikisler</a>
|
Other contributors: <a href="https://github.com/ikisler"><img src="https://avatars2.githubusercontent.com/u/12506147?v=3&s=32" class="logo" /> @ikisler</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!------------------->
|
<!------------------->
|
||||||
<link rel="stylesheet" href="//starbeamrainbowlabs.com/theme/basic.css" />
|
<link rel="stylesheet" href="//starbeamrainbowlabs.com/theme/basic.css" />
|
||||||
<style>
|
<style>
|
||||||
body { padding: 1rem; color: #442772; background-colour: #eee8f2; } /* syntaxtic gets confused sometimes */
|
body { padding: 1rem; color: #442772; background-colour: #eee8f2; } /* syntaxtic gets confused sometimes */
|
||||||
a { color: #9e7eb4; }
|
a { color: #9e7eb4; }
|
||||||
.largebutton { font-size: 2rem; }
|
.largebutton { font-size: 2rem; }
|
||||||
|
|
||||||
.logo { max-width: 1.25em; vertical-align: middle; }
|
.logo { max-width: 1.25em; vertical-align: middle; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function select(state)
|
function select(state)
|
||||||
{
|
{
|
||||||
var checkboxes = document.querySelectorAll("input[type=checkbox]");
|
var checkboxes = document.querySelectorAll("input[type=checkbox]");
|
||||||
for(var i = 0; i < checkboxes.length; i++)
|
for(var i = 0; i < checkboxes.length; i++)
|
||||||
{
|
{
|
||||||
checkboxes[i].checked = state;
|
checkboxes[i].checked = state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function download()
|
function download()
|
||||||
{
|
{
|
||||||
var url = "pack.php?web=true&modules=",
|
var url = "pack.php?web=true&modules=",
|
||||||
checkboxes = document.querySelectorAll("input[type=checkbox]");
|
checkboxes = document.querySelectorAll("input[type=checkbox]");
|
||||||
for(var i = 0; i < checkboxes.length; i++)
|
for(var i = 0; i < checkboxes.length; i++) {
|
||||||
{
|
if(!checkboxes[i].checked) continue;
|
||||||
url += encodeURIComponent(checkboxes[i].id) + ",";
|
url += encodeURIComponent(checkboxes[i].id) + ",";
|
||||||
}
|
}
|
||||||
location.href = url;
|
location.href = url;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1590614701"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-916802093"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1590614701" class="accordion-body collapse in">
|
<div id="namespace-916802093" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1201853617"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1519792449"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1201853617" class="accordion-body collapse in">
|
<div id="namespace-1519792449" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1762545865"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1259322339"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1762545865" class="accordion-body collapse in">
|
<div id="namespace-1259322339" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-467287636"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1299046630"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-467287636" class="accordion-body collapse in">
|
<div id="namespace-1299046630" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1305938681"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-934152949"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1305938681" class="accordion-body collapse in">
|
<div id="namespace-934152949" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-792316182"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-95919985"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-792316182" class="accordion-body collapse in">
|
<div id="namespace-95919985" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1698973592"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-881926704"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1698973592" class="accordion-body collapse in">
|
<div id="namespace-881926704" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ at which the comments are being rendered.</p></td>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1215420120"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-456108991"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1215420120" class="accordion-body collapse in">
|
<div id="namespace-456108991" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1501573311"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-856192580"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1501573311" class="accordion-body collapse in">
|
<div id="namespace-856192580" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,31 +202,39 @@
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">history_add_revision()</h3>
|
<h3 class=" ">history_add_revision()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">history_add_revision( <span class="argument">$pageinfo</span>, <span class="argument">$newsource</span>, <span class="argument">$oldsource</span>, <span class="argument">$save_pageindex = true</span>) </pre>
|
<pre class="signature" style="margin-right: 54px;">history_add_revision(object <span class="argument">$pageinfo</span>, string <span class="argument">$newsource</span>, string <span class="argument">$oldsource</span>, boolean <span class="argument">$save_pageindex = true</span>, string <span class="argument">$change_type = "edit"</span>) </pre>
|
||||||
<p><em></em></p>
|
<p><em>Adds a history revision against a page.</em></p>
|
||||||
|
<p>Note: Does not updaate the current page content! This function <em>only</em>
|
||||||
|
records a new revision against a page name. Thus it is possible to have a
|
||||||
|
disparaty between the history revisions and the actual content displayed in
|
||||||
|
the current revision if you're not careful!</p>
|
||||||
|
|
||||||
<h4>Parameters</h4>
|
<h4>Parameters</h4>
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>object</td>
|
||||||
<td>$pageinfo </td>
|
<td>$pageinfo </td>
|
||||||
<td></td>
|
<td><p>The pageindex object of the page to operate on.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>string</td>
|
||||||
<td>$newsource </td>
|
<td>$newsource </td>
|
||||||
<td></td>
|
<td><p>The page content to save as the new revision.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>string</td>
|
||||||
<td>$oldsource </td>
|
<td>$oldsource </td>
|
||||||
<td></td>
|
<td><p>The old page content that is the current revision (before the update).</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>boolean</td>
|
||||||
<td>$save_pageindex </td>
|
<td>$save_pageindex </td>
|
||||||
<td></td>
|
<td><p>Whether the page index should be saved to disk.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$change_type </td>
|
||||||
|
<td><p>The type of change to record this as in the history revision log</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -304,7 +312,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1058290855"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-97811887"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1058290855" class="accordion-body collapse in">
|
<div id="namespace-97811887" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-45005036"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-931727769"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-45005036" class="accordion-body collapse in">
|
<div id="namespace-931727769" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,7 +189,63 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<section class="span8 content file">
|
||||||
|
<h2>Functions</h2>
|
||||||
|
</section>
|
||||||
|
<aside class="span4 detailsbar"></aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_update_redirect_metadata" name="method_update_redirect_metadata" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">update_redirect_metadata()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">update_redirect_metadata(object <span class="argument">$index_entry</span>, string <span class="argument">$pagedata</span>) </pre>
|
||||||
|
<p><em>Updates the metadata associated with redirects in the pageindex entry
|
||||||
|
specified utilising the provided page content.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>object</td>
|
||||||
|
<td>$index_entry </td>
|
||||||
|
<td><p>The page index entry object to update.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pagedata </td>
|
||||||
|
<td><p>The page content to operate on.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/feature-redirect.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -239,7 +295,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-278263455"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-502844686"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-278263455" class="accordion-body collapse in">
|
<div id="namespace-502844686" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-89132357"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-186827657"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-89132357" class="accordion-body collapse in">
|
<div id="namespace-186827657" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1393628047"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-150658766"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1393628047" class="accordion-body collapse in">
|
<div id="namespace-150658766" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ the image.</p></td>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1107371369"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-965061163"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1107371369" class="accordion-body collapse in">
|
<div id="namespace-965061163" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
303
docs/ModuleApi/files/modules.feature-user-table.html
Normal file
303
docs/ModuleApi/files/modules.feature-user-table.html
Normal file
|
@ -0,0 +1,303 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>Pepperminty Wiki Module API</title>
|
||||||
|
<meta name="author" content=""/>
|
||||||
|
<meta name="description" content=""/>
|
||||||
|
|
||||||
|
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
||||||
|
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
<link href="../css/prism.css" rel="stylesheet" media="all"/>
|
||||||
|
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
||||||
|
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../js/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="../js/jquery-1.11.0.min.js"></script>
|
||||||
|
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
|
||||||
|
<script src="../js/bootstrap.min.js"></script>
|
||||||
|
<script src="../js/jquery.smooth-scroll.js"></script>
|
||||||
|
<script src="../js/prism.min.js"></script>
|
||||||
|
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadExternalCodeSnippets() {
|
||||||
|
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
|
||||||
|
var src = pre.getAttribute('data-src');
|
||||||
|
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
||||||
|
var language = 'php';
|
||||||
|
|
||||||
|
var code = document.createElement('code');
|
||||||
|
code.className = 'language-' + language;
|
||||||
|
|
||||||
|
pre.textContent = '';
|
||||||
|
|
||||||
|
code.textContent = 'Loading…';
|
||||||
|
|
||||||
|
pre.appendChild(code);
|
||||||
|
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
|
xhr.open('GET', src, true);
|
||||||
|
|
||||||
|
xhr.onreadystatechange = function () {
|
||||||
|
if (xhr.readyState == 4) {
|
||||||
|
|
||||||
|
if (xhr.status < 400 && xhr.responseText) {
|
||||||
|
code.textContent = xhr.responseText;
|
||||||
|
|
||||||
|
Prism.highlightElement(code);
|
||||||
|
}
|
||||||
|
else if (xhr.status >= 400) {
|
||||||
|
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
code.textContent = '✖ Error: File does not exist or is empty';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.send(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
loadExternalCodeSnippets();
|
||||||
|
});
|
||||||
|
$('#source-view').on('shown', function () {
|
||||||
|
loadExternalCodeSnippets();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="../images/favicon.ico"/>
|
||||||
|
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
|
||||||
|
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
|
||||||
|
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container">
|
||||||
|
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<i class="icon-ellipsis-vertical"></i>
|
||||||
|
</a>
|
||||||
|
<a class="brand" href="../index.html">Pepperminty Wiki Module API</a>
|
||||||
|
|
||||||
|
<div class="nav-collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li class="dropdown" id="charts-menu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
Charts <b class="caret"></b>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li>
|
||||||
|
<a href="../graphs/class.html">
|
||||||
|
<i class="icon-list-alt"></i> Class hierarchy diagram
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown" id="reports-menu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
Reports <b class="caret"></b>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li>
|
||||||
|
<a href="../reports/errors.html">
|
||||||
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="../reports/markers.html">
|
||||||
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="../reports/deprecated.html">
|
||||||
|
<i class="icon-list-alt"></i> Deprecated <span class="label label-info pull-right">0</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--<div class="go_to_top">-->
|
||||||
|
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
|
||||||
|
<!--</div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="___" class="container-fluid">
|
||||||
|
<section class="row-fluid">
|
||||||
|
<div class="span2 sidebar">
|
||||||
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
|
<div class="accordion-group">
|
||||||
|
<div class="accordion-heading">
|
||||||
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1447199197"></a>
|
||||||
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
|
</div>
|
||||||
|
<div id="namespace-1447199197" class="accordion-body collapse in">
|
||||||
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li class="class"><a href="../classes/ids.html">ids</a></li>
|
||||||
|
<li class="class"><a href="../classes/page_renderer.html">page_renderer</a></li>
|
||||||
|
<li class="class"><a href="../classes/PeppermintParsedown.html">PeppermintParsedown</a></li>
|
||||||
|
<li class="class"><a href="../classes/search.html">search</a></li>
|
||||||
|
<li class="class"><a href="../classes/Slimdown.html">Slimdown</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="row-fluid">
|
||||||
|
<div class="span10 offset2">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content file">
|
||||||
|
<nav>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
|
||||||
|
<h1><small>modules</small>feature-user-table.php</h1>
|
||||||
|
<p><em></em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<dl>
|
||||||
|
<dt>Package</dt>
|
||||||
|
<dd><div class="namespace-wrapper">\Default</div></dd>
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr><td colspan="2"><em>None found</em></td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<section class="span8 content file">
|
||||||
|
<h2>Functions</h2>
|
||||||
|
</section>
|
||||||
|
<aside class="span4 detailsbar"></aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_generate_password" name="method_generate_password" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">generate_password()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">generate_password(string <span class="argument">$length</span>) : string</pre>
|
||||||
|
<p><em>Generates a new (cryptographically secure) random password that's also readable (i.e. consonant-vowel-consonant).</em></p>
|
||||||
|
<p>This implementation may be changed in the future to use random dictionary words instead - ref <a href="https://xkcd.com/936/">https://xkcd.com/936/</a></p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$length </td>
|
||||||
|
<td><p>The length of password to generate.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
string
|
||||||
|
— <p>The generated random password.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/feature-user-table.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="source-view-label"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<pre data-src="../files/modules/feature-user-table.php.txt" class="language-php line-numbers"></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="row-fluid">
|
||||||
|
<section class="span10 offset2">
|
||||||
|
<section class="row-fluid">
|
||||||
|
<section class="span10 offset1">
|
||||||
|
<section class="row-fluid footer-sections">
|
||||||
|
<section class="span4">
|
||||||
|
<h1><i class="icon-code"></i></h1>
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="span4">
|
||||||
|
<h1><i class="icon-bar-chart"></i></h1>
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="span4">
|
||||||
|
<h1><i class="icon-pushpin"></i></h1>
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
<li><a href="../reports/errors.html">Errors</a></li>
|
||||||
|
<li><a href="../reports/markers.html">Markers</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<section class="row-fluid">
|
||||||
|
<section class="span10 offset1">
|
||||||
|
<hr />
|
||||||
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
|
on December 12th, 2018 at 23:20.
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1996735192"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1607202909"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1996735192" class="accordion-body collapse in">
|
<div id="namespace-1607202909" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1791832302"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-896025008"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1791832302" class="accordion-body collapse in">
|
<div id="namespace-896025008" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-218236975"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1390646836"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-218236975" class="accordion-body collapse in">
|
<div id="namespace-1390646836" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1723495381"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1738157705"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1723495381" class="accordion-body collapse in">
|
<div id="namespace-1738157705" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-372193933"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-695021724"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-372193933" class="accordion-body collapse in">
|
<div id="namespace-695021724" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1273845436"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-555732598"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1273845436" class="accordion-body collapse in">
|
<div id="namespace-555732598" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2125266591"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1627263905"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-2125266591" class="accordion-body collapse in">
|
<div id="namespace-1627263905" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-902027099"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1771873420"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-902027099" class="accordion-body collapse in">
|
<div id="namespace-1771873420" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,6 +198,80 @@
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_do_password_hash_code_update" name="method_do_password_hash_code_update" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">do_password_hash_code_update()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">do_password_hash_code_update() </pre>
|
||||||
|
<p><em>Recalculates and updates the password hashing cost.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/page-login.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_properties" name="method_hash_password_properties" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_properties()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_properties() : array</pre>
|
||||||
|
<p><em>Figures out the appropriate algorithm & options for hashing passwords based
|
||||||
|
on the current settings.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
array
|
||||||
|
— <p>The appropriate password hashing algorithm and options.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/page-login.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_hash_password" name="method_hash_password" class="anchor"></a>
|
<a id="method_hash_password" name="method_hash_password" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">hash_password()</h3>
|
<h3 class=" ">hash_password()</h3>
|
||||||
|
@ -245,6 +319,156 @@ enabled, or sha256 otherwise.</p>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_verify_password" name="method_verify_password" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">verify_password()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">verify_password(string <span class="argument">$pass</span>, string <span class="argument">$hash</span>) : boolean</pre>
|
||||||
|
<p><em>Verifies a user's password against a pre-generated hash.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pass </td>
|
||||||
|
<td><p>The user's password.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$hash </td>
|
||||||
|
<td><p>The hash to compare against.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>Whether the password matches the has or not.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/page-login.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_update" name="method_hash_password_update" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_update()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_update(string <span class="argument">$pass</span>, string <span class="argument">$hash</span>) : string|null</pre>
|
||||||
|
<p><em>Determines if the provided password needs re-hashing or not.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pass </td>
|
||||||
|
<td><p>The password to check.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$hash </td>
|
||||||
|
<td><p>The hash of the provided password to check.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
string|null
|
||||||
|
— <p>Returns null if an updaste is not required - otherwise returns the new updated hash.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/page-login.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_compute_cost" name="method_hash_password_compute_cost" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_compute_cost()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_compute_cost( <span class="argument">$verbose = false</span>) : integer</pre>
|
||||||
|
<p><em>Computes the appropriate cost value for password_hash based on the settings
|
||||||
|
automatically.</em></p>
|
||||||
|
<p>Starts at 10 and works upwards in increments of 1. Goes on until a value is
|
||||||
|
found that's greater than the target - or 10x the target time elapses.</p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>$verbose </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
integer
|
||||||
|
— <p>The automatically calculated password hashing cost.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper">modules/page-login.php</div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -295,7 +519,7 @@ enabled, or sha256 otherwise.</p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-538646369"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-344540520"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-538646369" class="accordion-body collapse in">
|
<div id="namespace-344540520" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1253811666"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-454082833"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1253811666" class="accordion-body collapse in">
|
<div id="namespace-454082833" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-703830550"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1390596827"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-703830550" class="accordion-body collapse in">
|
<div id="namespace-1390596827" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-521074668"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1338354080"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-521074668" class="accordion-body collapse in">
|
<div id="namespace-1338354080" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-260467534"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1355842757"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-260467534" class="accordion-body collapse in">
|
<div id="namespace-1355842757" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-130943677"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2104154077"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-130943677" class="accordion-body collapse in">
|
<div id="namespace-2104154077" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1488299317"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1729883526"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1488299317" class="accordion-body collapse in">
|
<div id="namespace-1729883526" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Password hashing action",
|
"name" => "Password hashing action",
|
||||||
"version" => "0.6",
|
"version" => "0.7",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
|
"description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
|
||||||
"id" => "action-hash",
|
"id" => "action-hash",
|
||||||
|
@ -41,7 +41,7 @@ register_module([
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
exit(page_renderer::render_main("Hashed string", "<p>Algorithm: " . ($settings->use_sha3 ? "sha3" : "sha256") . "</p>\n<p><code>" . $_GET["string"] . "</code> → <code>" . hash_password($_GET["string"]) . "</code></p>"));
|
exit(page_renderer::render_main("Hashed string", "<p>Algorithm: <code>$settings->password_algorithm</code></p>\n<p><code>" . $_GET["string"] . "</code> → <code>" . hash_password($_GET["string"]) . "</code></p>"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Random Page",
|
"name" => "Random Page",
|
||||||
"version" => "0.2",
|
"version" => "0.3",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds an action called 'random' that redirects you to a random page.",
|
"description" => "Adds an action called 'random' that redirects you to a random page.",
|
||||||
"id" => "action-random",
|
"id" => "action-random",
|
||||||
|
@ -25,7 +25,11 @@ register_module([
|
||||||
|
|
||||||
// Filter out pages we shouldn't send the user to
|
// Filter out pages we shouldn't send the user to
|
||||||
$pageNames = array_values(array_filter($pageNames, function($pagename) {
|
$pageNames = array_values(array_filter($pageNames, function($pagename) {
|
||||||
global $settings;
|
global $settings, $pageindex;
|
||||||
|
if($settings->random_page_exclude_redirects &&
|
||||||
|
isset($pageindex->$pagename->redirect) &&
|
||||||
|
$pageindex->$pagename->redirect === true)
|
||||||
|
return false;
|
||||||
return preg_match($settings->random_page_exclude, $pagename) === 0 ? true : false;
|
return preg_match($settings->random_page_exclude, $pagename) === 0 ? true : false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ register_module([
|
||||||
"name" => "API status",
|
"name" => "API status",
|
||||||
"version" => "0.1",
|
"version" => "0.1",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Provides a basic JSON status action that provices a few useful bits of information for API consumption.",
|
"description" => "Provides a basic JSON status action that provides a few useful bits of information for API consumption.",
|
||||||
"id" => "api-status",
|
"id" => "api-status",
|
||||||
"code" => function() {
|
"code" => function() {
|
||||||
global $settings;
|
global $settings;
|
||||||
|
@ -16,7 +16,13 @@ register_module([
|
||||||
* @apiParam {boolean} Whether or not the result should be minified JSON. Default: false
|
* @apiParam {boolean} Whether or not the result should be minified JSON. Default: false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ███████ ████████ █████ ████████ ██ ██ ███████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ███████ ██ ███████ ██ ██ ██ ███████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ███████ ██ ██ ██ ██ ██████ ███████
|
||||||
|
*/
|
||||||
add_action("status", function() {
|
add_action("status", function() {
|
||||||
global $version, $env, $settings, $actions;
|
global $version, $env, $settings, $actions;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Settings GUI",
|
"name" => "Settings GUI",
|
||||||
"version" => "0.1.1",
|
"version" => "0.1.3",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.",
|
"description" => "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.",
|
||||||
"id" => "feature-guiconfig",
|
"id" => "feature-guiconfig",
|
||||||
|
@ -36,7 +36,7 @@ register_module([
|
||||||
|
|
||||||
$content = "<h1>Master Control Panel</h1>\n";
|
$content = "<h1>Master Control Panel</h1>\n";
|
||||||
$content .= "<p>This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!</p>\n";
|
$content .= "<p>This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!</p>\n";
|
||||||
$content .= "<p>You're currently running Pepperminty WIki $version+" . substr($commit, 0, 7) . ".</p>\n";
|
$content .= "<p>You're currently running Pepperminty Wiki $version+" . substr($commit, 0, 7) . ".</p>\n";
|
||||||
$content .= "<h2>Actions</h2>";
|
$content .= "<h2>Actions</h2>";
|
||||||
|
|
||||||
$content .= "<button class='action-invindex-rebuild' title='Rebuilds the index that is consulted when searching the wiki. Hit this button if some pages are not showing up.'>Rebuild Search Index</button>\n";
|
$content .= "<button class='action-invindex-rebuild' title='Rebuilds the index that is consulted when searching the wiki. Hit this button if some pages are not showing up.'>Rebuild Search Index</button>\n";
|
||||||
|
@ -99,6 +99,13 @@ SCRIPT;
|
||||||
$reverse = true;
|
$reverse = true;
|
||||||
$inputControl = "<input type='checkbox' id='$configKey' name='$configKey' " . ($settings->$configKey ? " checked" : "") . " />";
|
$inputControl = "<input type='checkbox' id='$configKey' name='$configKey' " . ($settings->$configKey ? " checked" : "") . " />";
|
||||||
break;
|
break;
|
||||||
|
case "usertable":
|
||||||
|
$label = "";
|
||||||
|
if(module_exists("feature-user-table"))
|
||||||
|
$inputControl = "<p>The users can be managed in the <a href='?action=user-table'>User Table</a>.</p>";
|
||||||
|
else
|
||||||
|
$inputControl = "<p><em>The users can be managed in the user table, but the required module <code>feature-user-table</code> is not installed.</em></p>";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$label = "";
|
$label = "";
|
||||||
$inputControl = "<p><em>Sorry! The <code>$configKey</code> setting isn't editable yet through the gui. Please try editing <code>peppermint.json</code> for the time being.</em></p>";
|
$inputControl = "<p><em>Sorry! The <code>$configKey</code> setting isn't editable yet through the gui. Please try editing <code>peppermint.json</code> for the time being.</em></p>";
|
||||||
|
@ -135,8 +142,6 @@ SCRIPT;
|
||||||
* ██ ██ ██ ██ ██ ██
|
* ██ ██ ██ ██ ██ ██
|
||||||
* ███████ ██ ██ ████ ███████
|
* ███████ ██ ██ ████ ███████
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
add_action("configure-save", function () {
|
add_action("configure-save", function () {
|
||||||
global $env, $settings, $paths, $defaultCSS;
|
global $env, $settings, $paths, $defaultCSS;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Page History",
|
"name" => "Page History",
|
||||||
"version" => "0.3.1",
|
"version" => "0.4.1",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.",
|
"description" => "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.",
|
||||||
"id" => "feature-history",
|
"id" => "feature-history",
|
||||||
|
@ -12,7 +12,7 @@ register_module([
|
||||||
* @apiGroup Page
|
* @apiGroup Page
|
||||||
* @apiPermission Anonymous
|
* @apiPermission Anonymous
|
||||||
*
|
*
|
||||||
* @apiParam {string} page The page name to return a revision list for.
|
* @apiUse PageParameter
|
||||||
* @apiParam {string} format The format to return the list of pages in. available values: html, json, text. Default: html
|
* @apiParam {string} format The format to return the list of pages in. available values: html, json, text. Default: html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ register_module([
|
||||||
$content .= "\t\t<ul class='page-list'>\n";
|
$content .= "\t\t<ul class='page-list'>\n";
|
||||||
foreach(array_reverse($pageindex->{$env->page}->history) as $revisionData)
|
foreach(array_reverse($pageindex->{$env->page}->history) as $revisionData)
|
||||||
{
|
{
|
||||||
// Only display edits for now
|
// Only display edits & reverts for now
|
||||||
if($revisionData->type != "edit")
|
if(!in_array($revisionData->type, [ "edit", "revert" ]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// The number (and the sign) of the size difference to display
|
// The number (and the sign) of the size difference to display
|
||||||
$size_display = ($revisionData->sizediff > 0 ? "+" : "") . $revisionData->sizediff;
|
$size_display = ($revisionData->sizediff > 0 ? "+" : "") . $revisionData->sizediff;
|
||||||
|
@ -48,8 +48,13 @@ register_module([
|
||||||
$size_display_class .= " significant";
|
$size_display_class .= " significant";
|
||||||
$size_title_display = human_filesize($revisionData->newsize - $revisionData->sizediff) . " -> " . human_filesize($revisionData->newsize);
|
$size_title_display = human_filesize($revisionData->newsize - $revisionData->sizediff) . " -> " . human_filesize($revisionData->newsize);
|
||||||
|
|
||||||
$content .= "<li><a href='?page=" . rawurlencode($env->page) . "&revision=$revisionData->rid'>#$revisionData->rid</a> " . render_editor(page_renderer::render_username($revisionData->editor)) . " " . render_timestamp($revisionData->timestamp) . " <span class='cursor-query $size_display_class' title='$size_title_display'>($size_display)</span>";
|
$content .= "\t\t\t<li>";
|
||||||
|
$content .= "<a href='?page=" . rawurlencode($env->page) . "&revision=$revisionData->rid'>#$revisionData->rid</a> " . render_editor(page_renderer::render_username($revisionData->editor)) . " " . render_timestamp($revisionData->timestamp) . " <span class='cursor-query $size_display_class' title='$size_title_display'>($size_display)</span>";
|
||||||
|
if($env->is_logged_in || ($settings->history_revert_require_moderator && $env->is_admin && $env->is_logged_in))
|
||||||
|
$content .= " <small>(<a class='revert-button' href='?action=history-revert&page=" . rawurlencode($env->page) . "&revision=$revisionData->rid'>restore this revision</a>)</small>";
|
||||||
|
$content .= "</li>\n";
|
||||||
}
|
}
|
||||||
|
$content .= "\t\t</ul>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -83,31 +88,157 @@ register_module([
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {get} ?action=history-revert&page={pageName}&revision={rid} Revert a page to a previous version
|
||||||
|
* @apiName HistoryRevert
|
||||||
|
* @apiGroup Editing
|
||||||
|
* @apiPermission User
|
||||||
|
* @apiUse PageParameter
|
||||||
|
* @apiUse UserNotLoggedInError
|
||||||
|
* @apiUse UserNotModeratorError
|
||||||
|
*
|
||||||
|
* @apiParam {string} revision The page revision number to revert to.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* ██ ██ ██ ███████ ████████ ██████ ██████ ██ ██
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ███████ ██ ███████ ██ ██ ██ ██████ ████ █████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ██ ███████ ██ ██████ ██ ██ ██
|
||||||
|
*
|
||||||
|
* ██████ ███████ ██ ██ ███████ ██████ ████████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██████ █████ ██ ██ █████ ██████ ██
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ███████ ████ ███████ ██ ██ ██
|
||||||
|
*/
|
||||||
|
add_action("history-revert", function() {
|
||||||
|
global $env, $settings, $pageindex;
|
||||||
|
|
||||||
|
if((!$env->is_admin && $settings->history_revert_require_moderator) ||
|
||||||
|
!$env->is_logged_in) {
|
||||||
|
http_response_code(401);
|
||||||
|
exit(page_renderer::render_main("Unauthorised - $settings->sitename", "<p>You can't revert pages to a previous revision because " . ($settings->history_revert_require_moderator && $env->is_logged_in ? "you aren't logged in as a moderator. You can try <a href='?action=logout'>logging out</a> and then" : "you aren't logged in. You can try") . " <a href='?action=login&returnto=" . rawurlencode("?action=history-revert&revision={$env->history->revision_number}&page=" . rawurlencode($env->page)) . "'>logging in</a>.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$current_revision_filepath = "$env->storage_prefix/{$pageindex->{$env->page}->filename}";
|
||||||
|
|
||||||
|
// Figure out what we're saving
|
||||||
|
$newsource = file_get_contents($env->page_filename); // The old revision content - the Pepperminty Wiki core sorts this out for us
|
||||||
|
$oldsource = file_get_contents($current_revision_filepath); // The current revision's content
|
||||||
|
|
||||||
|
// Save the old content over the current content
|
||||||
|
file_put_contents($current_revision_filepath, $newsource);
|
||||||
|
|
||||||
|
// NOTE: We don't run the save preprocessors here because they are run when a page is edited - reversion is special and requires different treatment.
|
||||||
|
// FUTURE: We may want ot refactor the save preprocessor system ot take a single object instead - then we can add as many params as we like and we could execute the save preprocessors as normal :P
|
||||||
|
|
||||||
|
// Add the old content as a new revision
|
||||||
|
$result = history_add_revision(
|
||||||
|
$pageindex->{$env->page},
|
||||||
|
$newsource,
|
||||||
|
$oldsource,
|
||||||
|
true, // Yep, go ahead and save the page index
|
||||||
|
"revert" // It's a revert, not an edit
|
||||||
|
);
|
||||||
|
|
||||||
|
// Update the redirect metadata, if the redirect module is installed
|
||||||
|
if(module_exists("feature-redirect"))
|
||||||
|
update_redirect_metadata($pageindex->{$env->page}, $newsource);
|
||||||
|
|
||||||
|
// Add an entry to the recent changes log, if the module exists
|
||||||
|
if($result !== false && module_exists("feature-recent-changes"))
|
||||||
|
add_recent_change([
|
||||||
|
"type" => "revert",
|
||||||
|
"timestamp" => time(),
|
||||||
|
"page" => $env->page,
|
||||||
|
"user" => $env->user,
|
||||||
|
"newsize" => strlen($newsource),
|
||||||
|
"sizediff" => strlen($newsource) - strlen($oldsource)
|
||||||
|
]);
|
||||||
|
|
||||||
|
if($result === false) {
|
||||||
|
http_response_code(503);
|
||||||
|
exit(page_renderer::render_main("Server Error - Revert - $settings->sitename", "<p>A server error occurred when $settings->sitename tried to save the reversion of <code>" . htmlentities($env->page) . "</code>. Please contact $settings->sitename's administrator $settings->admindetails_name, whose email address can be found at the bottom of every page (including this one).</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
http_response_code(201);
|
||||||
|
exit(page_renderer::render_main("Reverting " . htmlentities($env->page) . " - $settings->sitename", "<p>" . htmlentities($env->page) . " has been reverted back to revision {$env->history->revision_number} successfully.</p>
|
||||||
|
<p><a href='?page=" . rawurlencode($env->page) . "'>Go back</a> to the page, or continue <a href='?action=history&page = " . rawurlencode($env->page) . "'>reviewing its history</a>.</p>"));
|
||||||
|
|
||||||
|
// $env->page_filename
|
||||||
|
//
|
||||||
|
});
|
||||||
|
|
||||||
register_save_preprocessor("history_add_revision");
|
register_save_preprocessor("history_add_revision");
|
||||||
|
|
||||||
|
if(module_exists("feature-stats")) {
|
||||||
|
statistic_add([
|
||||||
|
"id" => "history_most_revisions",
|
||||||
|
"name" => "Most revised page",
|
||||||
|
"type" => "scalar",
|
||||||
|
"update" => function($old_stats) {
|
||||||
|
global $pageindex;
|
||||||
|
|
||||||
|
$target_pagename = "";
|
||||||
|
$target_revisions = -1;
|
||||||
|
foreach($pageindex as $pagename => $pagedata) {
|
||||||
|
if(!isset($pagedata->history))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$revisions_count = count($pagedata->history);
|
||||||
|
if($revisions_count > $target_revisions) {
|
||||||
|
$target_revisions = $revisions_count;
|
||||||
|
$target_pagename = $pagename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = new stdClass(); // completed, value, state
|
||||||
|
$result->completed = true;
|
||||||
|
$result->value = "(no revisions saved yet)";
|
||||||
|
if($target_revisions > -1) {
|
||||||
|
$result->value = "$target_revisions (<a href='?page=" . rawurlencode($target_pagename) . "'>" . htmlentities($target_pagename) . "</a>)";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function history_add_revision(&$pageinfo, &$newsource, &$oldsource, $save_pageindex = true) {
|
/**
|
||||||
global $pageindex, $paths, $env;
|
* Adds a history revision against a page.
|
||||||
|
* Note: Does not updaate the current page content! This function _only_
|
||||||
|
* records a new revision against a page name. Thus it is possible to have a
|
||||||
|
* disparaty between the history revisions and the actual content displayed in
|
||||||
|
* the current revision if you're not careful!
|
||||||
|
* @param object $pageinfo The pageindex object of the page to operate on.
|
||||||
|
* @param string $newsource The page content to save as the new revision.
|
||||||
|
* @param string $oldsource The old page content that is the current revision (before the update).
|
||||||
|
* @param boolean $save_pageindex Whether the page index should be saved to disk.
|
||||||
|
* @param string $change_type The type of change to record this as in the history revision log
|
||||||
|
*/
|
||||||
|
function history_add_revision(&$pageinfo, &$newsource, &$oldsource, $save_pageindex = true, $change_type = "edit") {
|
||||||
|
global $env, $paths, $settings, $pageindex;
|
||||||
|
|
||||||
if(!isset($pageinfo->history))
|
if(!isset($pageinfo->history))
|
||||||
$pageinfo->history = [];
|
$pageinfo->history = [];
|
||||||
|
|
||||||
// Save the *new source* as a revision
|
// Save the *new source* as a revision
|
||||||
// This results in 2 copies of the current source, but this is ok
|
// This results in 2 copies of the current source, but this is ok
|
||||||
// since any time someone changes something, it create a new
|
// since any time someone changes something, it creates a new revision
|
||||||
// revision
|
|
||||||
// Note that we can't save the old source here because we'd have no
|
// Note that we can't save the old source here because we'd have no
|
||||||
// clue who edited it since $pageinfo has already been updated by
|
// clue who edited it since $pageinfo has already been updated by
|
||||||
// this point
|
// this point
|
||||||
|
|
||||||
// TODO Store tag changes here
|
// TODO Store tag changes here
|
||||||
$nextRid = count($pageinfo->history); // The next revision id
|
end($pageinfo->history); // Calculate the next revision id - we can't just count the reivisions here because we might have a revision limit
|
||||||
|
$nextRid = !empty($pageindex->history) ? $pageinfo->history[key($pageinfo->history)]->rid + 1 : 0;
|
||||||
$ridFilename = "$pageinfo->filename.r$nextRid";
|
$ridFilename = "$pageinfo->filename.r$nextRid";
|
||||||
// Insert a new entry into the history
|
// Insert a new entry into the history
|
||||||
$pageinfo->history[] = [
|
$pageinfo->history[] = [
|
||||||
"type" => "edit", // We might want to store other types later (e.g. page moves)
|
"type" => $change_type, // We might want to store other types later (e.g. page moves)
|
||||||
"rid" => $nextRid,
|
"rid" => $nextRid,
|
||||||
"timestamp" => time(),
|
"timestamp" => time(),
|
||||||
"filename" => $ridFilename,
|
"filename" => $ridFilename,
|
||||||
|
@ -117,11 +248,23 @@ function history_add_revision(&$pageinfo, &$newsource, &$oldsource, $save_pagein
|
||||||
];
|
];
|
||||||
|
|
||||||
// Save the new source as a revision
|
// Save the new source as a revision
|
||||||
file_put_contents("$env->storage_prefix$ridFilename", $newsource);
|
$result = file_put_contents("$env->storage_prefix$ridFilename", $newsource);
|
||||||
|
|
||||||
|
if($result !== false &&
|
||||||
|
$settings->history_max_revisions > -1) {
|
||||||
|
while(count($pageinfo->history) > $settings->history_max_revisions) {
|
||||||
|
// We've got too many revisions - trim one off & delete it
|
||||||
|
$oldest_revision = array_shift($pageinfo->history);
|
||||||
|
unlink("$env->storage_prefix/$oldest_revision->filename");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Save the edited pageindex
|
// Save the edited pageindex
|
||||||
if($save_pageindex)
|
if($result !== false && $save_pageindex)
|
||||||
file_put_contents($paths->pageindex, json_encode($pageindex, JSON_PRETTY_PRINT));
|
$result = file_put_contents($paths->pageindex, json_encode($pageindex, JSON_PRETTY_PRINT));
|
||||||
|
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Recent Changes",
|
"name" => "Recent Changes",
|
||||||
"version" => "0.3.4",
|
"version" => "0.3.5",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds recent changes. Access through the 'recent-changes' action.",
|
"description" => "Adds recent changes. Access through the 'recent-changes' action.",
|
||||||
"id" => "feature-recent-changes",
|
"id" => "feature-recent-changes",
|
||||||
|
@ -238,8 +238,10 @@ function render_recent_change($rchange)
|
||||||
|
|
||||||
$result = "";
|
$result = "";
|
||||||
$resultClasses = [];
|
$resultClasses = [];
|
||||||
switch(isset($rchange->type) ? $rchange->type : "edit")
|
$rchange_type = isset($rchange->type) ? $rchange->type : "edit";
|
||||||
|
switch($rchange_type)
|
||||||
{
|
{
|
||||||
|
case "revert":
|
||||||
case "edit":
|
case "edit":
|
||||||
// The number (and the sign) of the size difference to display
|
// The number (and the sign) of the size difference to display
|
||||||
$size_display = ($rchange->sizediff > 0 ? "+" : "") . $rchange->sizediff;
|
$size_display = ($rchange->sizediff > 0 ? "+" : "") . $rchange->sizediff;
|
||||||
|
@ -252,6 +254,8 @@ function render_recent_change($rchange)
|
||||||
|
|
||||||
if(!empty($rchange->newpage))
|
if(!empty($rchange->newpage))
|
||||||
$resultClasses[] = "newpage";
|
$resultClasses[] = "newpage";
|
||||||
|
if($rchange_type === "revert")
|
||||||
|
$resultClasses[] = "reversion";
|
||||||
|
|
||||||
$result .= "<a href='?page=" . rawurlencode($rchange->page) . ($revisionId !== false ? "&revision=$revisionId" : "") . "'>$pageDisplayHtml</a> $editorDisplayHtml $timeDisplayHtml <span class='$size_display_class' title='$size_title_display'>($size_display)</span>";
|
$result .= "<a href='?page=" . rawurlencode($rchange->page) . ($revisionId !== false ? "&revision=$revisionId" : "") . "'>$pageDisplayHtml</a> $editorDisplayHtml $timeDisplayHtml <span class='$size_display_class' title='$size_title_display'>($size_display)</span>";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -8,30 +8,38 @@ register_module([
|
||||||
"code" => function() {
|
"code" => function() {
|
||||||
global $settings;
|
global $settings;
|
||||||
|
|
||||||
register_save_preprocessor(function(&$index_entry, &$pagedata) {
|
register_save_preprocessor("update_redirect_metadata");
|
||||||
$matches = [];
|
|
||||||
if(preg_match("/^# ?REDIRECT ?\[\[([^\]]+)\]\]/i", $pagedata, $matches) === 1)
|
|
||||||
{
|
|
||||||
//error_log("matches: " . var_export($matches, true));
|
|
||||||
// We have found a redirect page!
|
|
||||||
// Update the metadata to reflect this.
|
|
||||||
$index_entry->redirect = true;
|
|
||||||
$index_entry->redirect_target = $matches[1];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// This page isn't a redirect. Unset the metadata just in case.
|
|
||||||
if(isset($index_entry->redirect))
|
|
||||||
unset($index_entry->redirect);
|
|
||||||
if(isset($index_entry->redirect_target))
|
|
||||||
unset($index_entry->redirect_target);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Register a help section
|
// Register a help section
|
||||||
add_help_section("25-redirect", "Redirect Pages", "<p>$settings->sitename supports redirect pages. To create a redirect page, enter something like <code># REDIRECT [[pagename]]</code> on the first line of the redirect page's content. This <em>must</em> appear as the first line of the page, with no whitespace before it. You can include content beneath the redirect if you want, too (such as a reason for redirecting the page).</p>");
|
add_help_section("25-redirect", "Redirect Pages", "<p>$settings->sitename supports redirect pages. To create a redirect page, enter something like <code># REDIRECT [[pagename]]</code> on the first line of the redirect page's content. This <em>must</em> appear as the first line of the page, with no whitespace before it. You can include content beneath the redirect if you want, too (such as a reason for redirecting the page).</p>");
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the metadata associated with redirects in the pageindex entry
|
||||||
|
* specified utilising the provided page content.
|
||||||
|
* @param object $index_entry The page index entry object to update.
|
||||||
|
* @param string $pagedata The page content to operate on.
|
||||||
|
*/
|
||||||
|
function update_redirect_metadata(&$index_entry, &$pagedata) {
|
||||||
|
$matches = [];
|
||||||
|
if(preg_match("/^# ?REDIRECT ?\[\[([^\]]+)\]\]/i", $pagedata, $matches) === 1)
|
||||||
|
{
|
||||||
|
//error_log("matches: " . var_export($matches, true));
|
||||||
|
// We have found a redirect page!
|
||||||
|
// Update the metadata to reflect this.
|
||||||
|
$index_entry->redirect = true;
|
||||||
|
$index_entry->redirect_target = $matches[1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// This page isn't a redirect. Unset the metadata just in case.
|
||||||
|
if(isset($index_entry->redirect))
|
||||||
|
unset($index_entry->redirect);
|
||||||
|
if(isset($index_entry->redirect_target))
|
||||||
|
unset($index_entry->redirect_target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Search",
|
"name" => "Search",
|
||||||
"version" => "0.6.2",
|
"version" => "0.7",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
|
"description" => "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
|
||||||
"id" => "feature-search",
|
"id" => "feature-search",
|
||||||
|
@ -36,10 +36,15 @@ register_module([
|
||||||
|
|
||||||
$index = search::index($source);
|
$index = search::index($source);
|
||||||
|
|
||||||
var_dump($env->page);
|
echo("Page name: $env->page\n");
|
||||||
var_dump($source);
|
echo("--------------- Source ---------------\n");
|
||||||
|
echo($source); echo("\n");
|
||||||
var_dump($index);
|
echo("--------------------------------------\n\n");
|
||||||
|
echo("---------------- Index ---------------\n");
|
||||||
|
foreach($index as $term => $entry) {
|
||||||
|
echo("$term: {$entry["freq"]} matches | " . implode(", ", $entry["offsets"]) . "\n");
|
||||||
|
}
|
||||||
|
echo("--------------------------------------\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,16 +130,33 @@ register_module([
|
||||||
|
|
||||||
$search_start = microtime(true);
|
$search_start = microtime(true);
|
||||||
|
|
||||||
|
|
||||||
|
$time_start = microtime(true);
|
||||||
$invindex = search::load_invindex($paths->searchindex);
|
$invindex = search::load_invindex($paths->searchindex);
|
||||||
|
$env->perfdata->invindex_decode_time = round((microtime(true) - $time_start)*1000, 3);
|
||||||
|
|
||||||
|
$start = microtime(true);
|
||||||
$results = search::query_invindex($_GET["query"], $invindex);
|
$results = search::query_invindex($_GET["query"], $invindex);
|
||||||
$resultCount = count($results);
|
$resultCount = count($results);
|
||||||
|
$env->perfdata->invindex_query_time = round((microtime(true) - $time_start)*1000, 3);
|
||||||
|
|
||||||
|
header("x-invindex-decode-time: {$env->perfdata->invindex_decode_time}ms");
|
||||||
|
header("x-invindex-query-time: {$env->perfdata->invindex_query_time}ms");
|
||||||
|
|
||||||
|
$start = microtime(true);
|
||||||
foreach($results as &$result) {
|
foreach($results as &$result) {
|
||||||
$result["context"] = search::extract_context(
|
$result["context"] = search::extract_context(
|
||||||
|
$invindex, $result["pagename"],
|
||||||
$_GET["query"],
|
$_GET["query"],
|
||||||
file_get_contents($env->storage_prefix . $result["pagename"] . ".md")
|
file_get_contents($env->storage_prefix . $result["pagename"] . ".md")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$env->perfdata->context_generation_time = round((microtime(true) - $start)*1000, 3);
|
||||||
|
header("x-context-generation-time: {$env->perfdata->context_generation_time}ms");
|
||||||
|
|
||||||
|
$env->perfdata->search_time = round((microtime(true) - $search_start)*1000, 3);
|
||||||
|
|
||||||
|
header("x-search-time: {$env->perfdata->search_time}ms");
|
||||||
|
|
||||||
if(!empty($_GET["format"]) && $_GET["format"] == "json") {
|
if(!empty($_GET["format"]) && $_GET["format"] == "json") {
|
||||||
header("content-type: application/json");
|
header("content-type: application/json");
|
||||||
|
@ -143,8 +165,6 @@ register_module([
|
||||||
exit(json_encode($json_results));
|
exit(json_encode($json_results));
|
||||||
}
|
}
|
||||||
|
|
||||||
$env->perfdata->search_time = round((microtime(true) - $search_start)*1000, 3);
|
|
||||||
|
|
||||||
$title = $_GET["query"] . " - Search results - $settings->sitename";
|
$title = $_GET["query"] . " - Search results - $settings->sitename";
|
||||||
|
|
||||||
$content = "<section>\n";
|
$content = "<section>\n";
|
||||||
|
@ -194,7 +214,7 @@ register_module([
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($matching_tags) > 0) {
|
if(count($matching_tags) > 0) {
|
||||||
$content .= "<p>Matching tags: <span class='tags'>";
|
$content .= "<p class='matching-tags-display'><label>Matching tags</label><span class='tags'>";
|
||||||
foreach($matching_tags as $tag) {
|
foreach($matching_tags as $tag) {
|
||||||
$content .= "\t<a href='?action=list-tags&tag=" . rawurlencode($tag) ."' class='mini-tag'>" . htmlentities($tag) . "</a> \n";
|
$content .= "\t<a href='?action=list-tags&tag=" . rawurlencode($tag) ."' class='mini-tag'>" . htmlentities($tag) . "</a> \n";
|
||||||
}
|
}
|
||||||
|
@ -369,13 +389,18 @@ register_module([
|
||||||
exit("Error: The type '$type' is not one of the supported output types. Available values: json, opensearch. Default: json");
|
exit("Error: The type '$type' is not one of the supported output types. Available values: json, opensearch. Default: json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$literator = Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: Lower(); :: NFC;', Transliterator::FORWARD);
|
||||||
|
|
||||||
|
$query = $literator->transliterate($_GET["query"]);
|
||||||
|
|
||||||
|
|
||||||
// Rank each page name
|
// Rank each page name
|
||||||
$results = [];
|
$results = [];
|
||||||
foreach($pageindex as $pageName => $entry) {
|
foreach($pageindex as $pageName => $entry) {
|
||||||
$results[] = [
|
$results[] = [
|
||||||
"pagename" => $pageName,
|
"pagename" => $pageName,
|
||||||
// Costs: Insert: 1, Replace: 8, Delete: 6
|
// Costs: Insert: 1, Replace: 8, Delete: 6
|
||||||
"distance" => levenshtein(mb_strtolower($_GET["query"]), mb_strtolower($pageName), 1, 8, 6)
|
"distance" => levenshtein($query, $literator->transliterate($pageName), 1, 8, 6)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,29 +536,23 @@ class search
|
||||||
*/
|
*/
|
||||||
public static function index($source)
|
public static function index($source)
|
||||||
{
|
{
|
||||||
|
// We don't need to normalise or transliterate here because self::tokenize() does this for us
|
||||||
$source = html_entity_decode($source, ENT_QUOTES);
|
$source = html_entity_decode($source, ENT_QUOTES);
|
||||||
$source_length = mb_strlen($source);
|
$source_length = mb_strlen($source);
|
||||||
|
|
||||||
$index = [];
|
$index = [];
|
||||||
|
|
||||||
$terms = self::tokenize($source);
|
$terms = self::tokenize($source, true);
|
||||||
$i = 0;
|
|
||||||
foreach($terms as $term)
|
foreach($terms as $term)
|
||||||
{
|
{
|
||||||
$nterm = $term;
|
|
||||||
|
|
||||||
// Skip over stop words (see https://en.wikipedia.org/wiki/Stop_words)
|
// Skip over stop words (see https://en.wikipedia.org/wiki/Stop_words)
|
||||||
if(in_array($nterm, self::$stop_words)) continue;
|
if(in_array($term[0], self::$stop_words)) continue;
|
||||||
|
|
||||||
if(!isset($index[$nterm]))
|
if(!isset($index[$term[0]]))
|
||||||
{
|
$index[$term[0]] = [ "freq" => 0, "offsets" => [] ];
|
||||||
$index[$nterm] = [ "freq" => 0, "offsets" => [] ];
|
|
||||||
}
|
|
||||||
|
|
||||||
$index[$nterm]["freq"]++;
|
$index[$term[0]]["freq"]++;
|
||||||
$index[$nterm]["offsets"][] = $i;
|
$index[$term[0]]["offsets"][] = $term[1];
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $index;
|
return $index;
|
||||||
|
@ -541,14 +560,25 @@ class search
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a source string into a series of raw tokens.
|
* Converts a source string into a series of raw tokens.
|
||||||
* @param string $source The source string to process.
|
* @param string $source The source string to process.
|
||||||
|
* @param boolean $capture_offsets Whether to capture & return the character offsets of the tokens detected. If true, then each token returned will be an array in the form [ token, char_offset ].
|
||||||
* @return array An array of raw tokens extracted from the specified source string.
|
* @return array An array of raw tokens extracted from the specified source string.
|
||||||
*/
|
*/
|
||||||
public static function tokenize($source)
|
public static function tokenize($source, $capture_offsets = false)
|
||||||
{
|
{
|
||||||
$source = Normalizer::normalize(strtolower($source), Normalizer::FORM_C);
|
/** Normalises input characters for searching & indexing */
|
||||||
|
static $literator; if($literator == null) $literator = Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: Lower(); :: NFC;', Transliterator::FORWARD);
|
||||||
|
|
||||||
|
$flags = PREG_SPLIT_NO_EMPTY; // Don't return empty items
|
||||||
|
if($capture_offsets)
|
||||||
|
$flags |= PREG_SPLIT_OFFSET_CAPTURE;
|
||||||
|
|
||||||
|
// We don't need to normalise here because the transliterator handles
|
||||||
|
// this for us. Also, we can't move the literator to a static variable
|
||||||
|
// because PHP doesn't like it very much
|
||||||
|
$source = $literator->transliterate($source);
|
||||||
$source = preg_replace('/[\[\]\|\{\}\/]/u', " ", $source);
|
$source = preg_replace('/[\[\]\|\{\}\/]/u', " ", $source);
|
||||||
return preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))|\|/u", $source, -1, PREG_SPLIT_NO_EMPTY);
|
return preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))|\|/u", $source, -1, $flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -591,8 +621,8 @@ class search
|
||||||
$i++; $missing_files++;
|
$i++; $missing_files++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$pagesource = Normalizer::normalize(file_get_contents($page_filename), Normalizer::FORM_C);
|
// We do not transliterate or normalise here because the indexer will take care of this for us
|
||||||
$index = self::index($pagesource);
|
$index = self::index(file_get_contents($page_filename));
|
||||||
|
|
||||||
$pageid = ids::getid($pagename);
|
$pageid = ids::getid($pagename);
|
||||||
self::merge_into_invindex($invindex, $pageid, $index);
|
self::merge_into_invindex($invindex, $pageid, $index);
|
||||||
|
@ -641,7 +671,7 @@ class search
|
||||||
}
|
}
|
||||||
foreach($newindex as $nterm => $entry)
|
foreach($newindex as $nterm => $entry)
|
||||||
{
|
{
|
||||||
if(!isset($oldindex[$nterm]) or // If this world is new
|
if(!isset($oldindex[$nterm]) or // If this word is new
|
||||||
$newindex[$nterm] !== $oldindex[$nterm]) // If this word has changed
|
$newindex[$nterm] !== $oldindex[$nterm]) // If this word has changed
|
||||||
$changed[$nterm] = $newindex[$nterm];
|
$changed[$nterm] = $newindex[$nterm];
|
||||||
}
|
}
|
||||||
|
@ -744,6 +774,9 @@ class search
|
||||||
{
|
{
|
||||||
global $settings, $pageindex;
|
global $settings, $pageindex;
|
||||||
|
|
||||||
|
/** Normalises input characters for searching & indexing */
|
||||||
|
static $literator; if($literator == null) $literator = Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: Lower(); :: NFC;', Transliterator::FORWARD);
|
||||||
|
|
||||||
$query_terms = self::tokenize($query);
|
$query_terms = self::tokenize($query);
|
||||||
$matching_pages = [];
|
$matching_pages = [];
|
||||||
|
|
||||||
|
@ -763,6 +796,7 @@ class search
|
||||||
if(isset($invindex[$qterm]))
|
if(isset($invindex[$qterm]))
|
||||||
{
|
{
|
||||||
// Loop over each page in the inverted index entry
|
// Loop over each page in the inverted index entry
|
||||||
|
reset($invindex[$qterm]); // Reset array/object pointer
|
||||||
foreach($invindex[$qterm] as $pageid => $page_entry)
|
foreach($invindex[$qterm] as $pageid => $page_entry)
|
||||||
{
|
{
|
||||||
// Create an entry in the matching pages array if it doesn't exist
|
// Create an entry in the matching pages array if it doesn't exist
|
||||||
|
@ -774,13 +808,18 @@ class search
|
||||||
|
|
||||||
|
|
||||||
// Loop over the pageindex and search the titles / tags
|
// Loop over the pageindex and search the titles / tags
|
||||||
|
reset($pageindex); // Reset array/object pointer
|
||||||
foreach ($pageindex as $pagename => $pagedata)
|
foreach ($pageindex as $pagename => $pagedata)
|
||||||
{
|
{
|
||||||
// Get the current page's id
|
// Setup a variable to hold the current page's id
|
||||||
$pageid = ids::getid($pagename);
|
$pageid = false; // Only fill this out if we find a match
|
||||||
// Consider matches in the page title
|
// Consider matches in the page title
|
||||||
if(stripos($pagename, $qterm) !== false)
|
// FUTURE: We may be able to optimise this further by using preg_match_all + preg_quote instead of mb_stripos_all. Experimentation / benchmarking is required to figure out which one is faster
|
||||||
|
$title_matches = mb_stripos_all($literator->transliterate($pagename), $qterm);
|
||||||
|
$title_matches_count = $title_matches !== false ? count($title_matches) : 0;
|
||||||
|
if($title_matches_count > 0)
|
||||||
{
|
{
|
||||||
|
$pageid = ids::getid($pagename); // Fill out the page id
|
||||||
// We found the qterm in the title
|
// We found the qterm in the title
|
||||||
if(!isset($matching_pages[$pageid]))
|
if(!isset($matching_pages[$pageid]))
|
||||||
$matching_pages[$pageid] = [ "nterms" => [] ];
|
$matching_pages[$pageid] = [ "nterms" => [] ];
|
||||||
|
@ -789,25 +828,30 @@ class search
|
||||||
if(!isset($matching_pages[$pageid]["title-matches"]))
|
if(!isset($matching_pages[$pageid]["title-matches"]))
|
||||||
$matching_pages[$pageid]["title-matches"] = 0;
|
$matching_pages[$pageid]["title-matches"] = 0;
|
||||||
|
|
||||||
$matching_pages[$pageid]["title-matches"] += count(mb_stripos_all($pagename, $qterm)) * strlen($qterm);
|
$matching_pages[$pageid]["title-matches"] += $title_matches_count * strlen($qterm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Consider matches in the page's tags
|
// Consider matches in the page's tags
|
||||||
if(isset($pagedata->tags) and // If this page has tags
|
$tag_matches = isset($pagedata->tags) ? mb_stripos_all($literator->transliterate(implode(" ", $pagedata->tags)), $qterm) : false;
|
||||||
stripos(implode(" ", $pagedata->tags), $qterm) !== false) // And we found the qterm in the tags
|
$tag_matches_count = $tag_matches !== false ? count($tag_matches) : 0;
|
||||||
|
|
||||||
|
if($tag_matches_count > 0) // And we found the qterm in the tags
|
||||||
{
|
{
|
||||||
|
if($pageid == false) // Fill out the page id if it hasn't been already
|
||||||
|
$pageid = ids::getid($pagename);
|
||||||
|
|
||||||
if(!isset($matching_pages[$pageid]))
|
if(!isset($matching_pages[$pageid]))
|
||||||
$matching_pages[$pageid] = [ "nterms" => [] ];
|
$matching_pages[$pageid] = [ "nterms" => [] ];
|
||||||
|
|
||||||
// Set up a counter for tag match if there isn't one already
|
// Set up a counter for tag match if there isn't one already
|
||||||
if(!isset($matching_pages[$pageid]["tag-matches"]))
|
if(!isset($matching_pages[$pageid]["tag-matches"]))
|
||||||
$matching_pages[$pageid]["tag-matches"] = 0;
|
$matching_pages[$pageid]["tag-matches"] = 0;
|
||||||
$matching_pages[$pageid]["tag-matches"] += count(mb_stripos_all(implode(" ", $pagedata->tags), $qterm)) * strlen($qterm);
|
$matching_pages[$pageid]["tag-matches"] += $tag_matches_count * strlen($qterm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset($matching_pages);
|
||||||
foreach($matching_pages as $pageid => &$pagedata)
|
foreach($matching_pages as $pageid => &$pagedata)
|
||||||
{
|
{
|
||||||
$pagedata["pagename"] = ids::getpagename($pageid);
|
$pagedata["pagename"] = ids::getpagename($pageid);
|
||||||
|
@ -816,6 +860,7 @@ class search
|
||||||
$pageOffsets = [];
|
$pageOffsets = [];
|
||||||
|
|
||||||
// Loop over each search term found on this page
|
// Loop over each search term found on this page
|
||||||
|
reset($pagedata["nterms"]);
|
||||||
foreach($pagedata["nterms"] as $pterm => $entry)
|
foreach($pagedata["nterms"] as $pterm => $entry)
|
||||||
{
|
{
|
||||||
// Add the number of occurrences of this search term to the ranking
|
// Add the number of occurrences of this search term to the ranking
|
||||||
|
@ -859,7 +904,6 @@ class search
|
||||||
// todo remove items if the rank is below a threshold
|
// todo remove items if the rank is below a threshold
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo sort by rank here
|
|
||||||
uasort($matching_pages, function($a, $b) {
|
uasort($matching_pages, function($a, $b) {
|
||||||
if($a["rank"] == $b["rank"]) return 0;
|
if($a["rank"] == $b["rank"]) return 0;
|
||||||
return ($a["rank"] < $b["rank"]) ? +1 : -1;
|
return ($a["rank"] < $b["rank"]) ? +1 : -1;
|
||||||
|
@ -871,29 +915,30 @@ class search
|
||||||
/**
|
/**
|
||||||
* Extracts a context string (in HTML) given a search query that could be displayed
|
* Extracts a context string (in HTML) given a search query that could be displayed
|
||||||
* in a list of search results.
|
* in a list of search results.
|
||||||
* @param string $query The search queary to generate the context for.
|
* @param string $invindex The inverted index to consult.
|
||||||
* @param string $source The page source to extract the context from.
|
* @param string $pagename The name of the paget that this source belongs to. Used when consulting the inverted index.
|
||||||
* @return string The generated context string.
|
* @param string $query The search queary to generate the context for.
|
||||||
|
* @param string $source The page source to extract the context from.
|
||||||
|
* @return string The generated context string.
|
||||||
*/
|
*/
|
||||||
public static function extract_context($query, $source)
|
public static function extract_context($invindex, $pagename, $query, $source)
|
||||||
{
|
{
|
||||||
global $settings;
|
global $settings;
|
||||||
|
|
||||||
|
$pageid = ids::getid($pagename);
|
||||||
$nterms = self::tokenize($query);
|
$nterms = self::tokenize($query);
|
||||||
$matches = [];
|
$matches = [];
|
||||||
// Loop over each nterm and find it in the source
|
|
||||||
foreach($nterms as $nterm)
|
foreach($nterms as $nterm) {
|
||||||
{
|
// Skip over words that don't appear in the inverted index (e.g. stop words)
|
||||||
if(in_array($nterm, static::$stop_words))
|
if(!isset($invindex[$nterm]))
|
||||||
continue;
|
continue;
|
||||||
$all_offsets = mb_stripos_all($source, $nterm);
|
// Skip if the page isn't found in the inverted index for this word
|
||||||
// Skip over adding matches if there aren't any
|
if(!isset($invindex[$nterm][$pageid]))
|
||||||
if($all_offsets === false)
|
|
||||||
continue;
|
continue;
|
||||||
foreach($all_offsets as $offset)
|
|
||||||
{
|
foreach($invindex[$nterm][$pageid]["offsets"] as $next_offset)
|
||||||
$matches[] = [ $nterm, $offset ];
|
$matches[] = [ $nterm, $next_offset ];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort the matches by offset
|
// Sort the matches by offset
|
||||||
|
@ -905,58 +950,53 @@ class search
|
||||||
$sourceLength = mb_strlen($source);
|
$sourceLength = mb_strlen($source);
|
||||||
|
|
||||||
$contexts = [];
|
$contexts = [];
|
||||||
$basepos = 0;
|
|
||||||
$matches_count = count($matches);
|
$matches_count = count($matches);
|
||||||
while($basepos < $matches_count)
|
$total_context_length = 0;
|
||||||
{
|
for($i = 0; $i < $matches_count; $i++) {
|
||||||
// Store the next match along - all others will be relative to that one
|
$next_context = [
|
||||||
$group = [$matches[$basepos]];
|
"from" => max(0, $matches[$i][1] - $settings->search_characters_context),
|
||||||
|
"to" => min($sourceLength, $matches[$i][1] + mb_strlen($matches[$i][0]) + $settings->search_characters_context)
|
||||||
|
];
|
||||||
|
|
||||||
// Start scanning at the next one along - we always store the first match
|
if(end($contexts) !== false && end($contexts)["to"] > $next_context["from"]) {
|
||||||
$scanpos = $basepos + 1;
|
// This next context overlaps with the previous one
|
||||||
$distance = 0;
|
// Extend the last one instead of adding a new one
|
||||||
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
// Break out if we reach the end
|
|
||||||
if($scanpos >= $matches_count) break;
|
|
||||||
|
|
||||||
// Find the distance between the current one and the last one
|
// The array pointer is pointing at the last element now because we called end() above
|
||||||
$distance = $matches[$scanpos][1] - $matches[$scanpos - 1][1];
|
|
||||||
|
|
||||||
// Store it if the distance is below the threshold
|
// Update the total context length counter appropriately
|
||||||
if($distance < $settings->search_characters_context)
|
$total_context_length += $next_context["to"] - $contexts[key($contexts)]["to"];
|
||||||
$group[] = $matches[$scanpos];
|
$contexts[key($contexts)]["to"] = $next_context["to"];
|
||||||
else
|
}
|
||||||
break;
|
else { // No overlap here! Business as usual.
|
||||||
|
$contexts[] = $next_context;
|
||||||
$scanpos++;
|
// Update the total context length counter as normal
|
||||||
|
$total_context_length += $next_context["to"] - $next_context["from"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$context_start = $group[0][1] - $settings->search_characters_context;
|
|
||||||
$context_end = $group[count($group) - 1][1] + $settings->search_characters_context;
|
|
||||||
|
|
||||||
if($context_start < 0) $context_start = 0;
|
end($contexts);
|
||||||
if($context_end > $sourceLength) $context_end = $sourceLength;
|
$last_context = &$contexts[key($contexts)];
|
||||||
|
if($total_context_length > $settings->search_characters_context_total) {
|
||||||
//echo("Got context. Start: $context_start, End: $context_end\n");
|
// We've reached the limit on the number of characters this context should contain. Trim off the context to fit and break out
|
||||||
//echo("Group:"); var_dump($group);
|
$last_context["to"] -= $total_context_length - $settings->search_characters_context_total;
|
||||||
|
break;
|
||||||
$context = substr($source, $context_start, $context_end - $context_start);
|
}
|
||||||
|
|
||||||
// Strip the markdown from the context - it's most likely going to
|
|
||||||
// be broken anyway.
|
|
||||||
//$context = self::strip_markup($context);
|
|
||||||
|
|
||||||
// Escape special characters to protect against attacks
|
|
||||||
$context = htmlentities($context);
|
|
||||||
|
|
||||||
$contexts[] = $context;
|
|
||||||
|
|
||||||
$basepos = $scanpos + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode(" ... ", $contexts);
|
$contexts_text = [];
|
||||||
|
foreach($contexts as $context) {
|
||||||
|
$contexts_text[] = substr($source, $context["from"], $context["to"] - $context["from"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = implode(" … ", $contexts_text);
|
||||||
|
end($contexts); // If there's at least one item in the list and were not at the very end of the page, add an extra ellipsis
|
||||||
|
if(isset($contexts[0]) && $contexts[key($contexts)]["to"] < $sourceLength) $result .= "… ";
|
||||||
|
// Prepend an ellipsis if the context doesn't start at the beginning of a page
|
||||||
|
if(isset($contexts[0]) && $contexts[0]["from"] > 0) $result = " …$result";
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -973,8 +1013,8 @@ class search
|
||||||
{
|
{
|
||||||
if(in_array($qterm, static::$stop_words))
|
if(in_array($qterm, static::$stop_words))
|
||||||
continue;
|
continue;
|
||||||
// From http://stackoverflow.com/a/2483859/1460422
|
|
||||||
|
|
||||||
|
// From http://stackoverflow.com/a/2483859/1460422
|
||||||
$context = preg_replace("/" . preg_replace('/\\//u', "\/", preg_quote($qterm)) . "/iu", "<strong class='search-term-highlight'>$0</strong>", $context);
|
$context = preg_replace("/" . preg_replace('/\\//u', "\/", preg_quote($qterm)) . "/iu", "<strong class='search-term-highlight'>$0</strong>", $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "User Preferences",
|
"name" => "User Preferences",
|
||||||
"version" => "0.3.2",
|
"version" => "0.3.3",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds a user preferences page, letting pople do things like change their email address and password.",
|
"description" => "Adds a user preferences page, letting people do things like change their email address and password.",
|
||||||
"id" => "feature-user-preferences",
|
"id" => "feature-user-preferences",
|
||||||
"code" => function() {
|
"code" => function() {
|
||||||
global $env, $settings;
|
global $env, $settings;
|
||||||
|
@ -147,14 +147,17 @@ register_module([
|
||||||
exit(page_renderer::render_main("Password mismatch - $settings->sitename", "<p>The new password you typed twice didn't match! <a href='javascript:history.back();'>Go back</a>.</p>"));
|
exit(page_renderer::render_main("Password mismatch - $settings->sitename", "<p>The new password you typed twice didn't match! <a href='javascript:history.back();'>Go back</a>.</p>"));
|
||||||
}
|
}
|
||||||
// Check the current password
|
// Check the current password
|
||||||
if(hash_password($_POST["current-pass"]) !== $env->user_data->password) {
|
if(!verify_password($_POST["current-pass"], $env->user_data->password)) {
|
||||||
exit(page_renderer::render_main("Password mismatch - $settings->sitename", "<p>Error: You typed your current password incorrectly! <a href='javascript:history.back();'>Go back</a>.</p>"));
|
exit(page_renderer::render_main("Password mismatch - $settings->sitename", "<p>Error: You typed your current password incorrectly! <a href='javascript:history.back();'>Go back</a>.</p>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// All's good! Go ahead and change the password.
|
// All's good! Go ahead and change the password.
|
||||||
$env->user_data->password = hash_password($_POST["new-pass"]);
|
$env->user_data->password = hash_password($_POST["new-pass"]);
|
||||||
// Save the userdata back to disk
|
// Save the userdata back to disk
|
||||||
save_userdata();
|
if(!save_userdata()) {
|
||||||
|
http_response_code(503);
|
||||||
|
exit(page_renderer::render_main("Error Saving Password - $settings->sitename", "<p>While you entered your old password correctly, $settings->sitename encountered an error whilst saving your password to disk! Your password has not been changed. Please contact $settings->admindetails_name for assistance (you can find their email address at the bottom of this page)."));
|
||||||
|
}
|
||||||
|
|
||||||
http_response_code(307);
|
http_response_code(307);
|
||||||
header("location: ?action=user-preferences&success=yes&operation=change-password");
|
header("location: ?action=user-preferences&success=yes&operation=change-password");
|
||||||
|
|
302
docs/ModuleApi/files/modules/feature-user-table.php.txt
Normal file
302
docs/ModuleApi/files/modules/feature-user-table.php.txt
Normal file
|
@ -0,0 +1,302 @@
|
||||||
|
<?php
|
||||||
|
register_module([
|
||||||
|
"name" => "User Organiser",
|
||||||
|
"version" => "0.1",
|
||||||
|
"author" => "Starbeamrainbowlabs",
|
||||||
|
"description" => "Adds a organiser page that lets moderators (or better) control the reegistered user accounts, and perform adminstrative actions such as password resets, and adding / removing accounts.",
|
||||||
|
"id" => "feature-user-table",
|
||||||
|
"code" => function() {
|
||||||
|
global $settings, $env;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {get} ?action=user-table Get the user table
|
||||||
|
* @apiName UserTable
|
||||||
|
* @apiGroup Settings
|
||||||
|
* @apiPermission Moderator
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ██ ██ ███████ ███████ ██████
|
||||||
|
* ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ███████ █████ ██████ █████
|
||||||
|
* ██ ██ ██ ██ ██ ██
|
||||||
|
* ██████ ███████ ███████ ██ ██
|
||||||
|
*
|
||||||
|
* ████████ █████ ██████ ██ ███████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ███████ ██████ ██ █████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ██ ██████ ███████ ███████
|
||||||
|
*/
|
||||||
|
add_action("user-table", function() {
|
||||||
|
global $settings, $env;
|
||||||
|
|
||||||
|
if(!$env->is_logged_in || !$env->is_admin) {
|
||||||
|
http_response_code(401);
|
||||||
|
exit(page_renderer::render_main("Unauthorised - User Table - $settings->sitename", "<p>Only moderators (or better) may access the user table. You could try <a href='?action=logout'>logging out</a> and then <a href='?action=login&returnto=index.php%3Faction%3Duser-table'>logging in</a> again as a moderator, or alternatively visit the <a href='?action=user-list'>user list</a> instead, if that's what you're after.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = "<h2>User Table</h2>
|
||||||
|
<p>(Warning! Deleting a user will wipe <em>all</em> their user data! It won't delete any pages they've created, their user page, or their avatar though, as those are part of the wiki itself.)</p>
|
||||||
|
<table class='user-table'>
|
||||||
|
<tr><th>Username</th><th>Email Address</th><th></th></tr>\n";
|
||||||
|
|
||||||
|
foreach($settings->users as $username => $user_data) {
|
||||||
|
$content .= "<tr>";
|
||||||
|
$content .= "<td>" . page_renderer::render_username($username) . "</td>";
|
||||||
|
if(!empty($user_data->email))
|
||||||
|
$content .= "<td><a href='mailto:" . htmlentities($user_data->email, ENT_HTML5 | ENT_QUOTES) . "'>" . htmlentities($user_data->email) . "</a></td>\n";
|
||||||
|
else
|
||||||
|
$content .= "<td><em>(None provided)</em></td>\n";
|
||||||
|
$content .= "<td>";
|
||||||
|
if(module_exists("feature-user-preferences"))
|
||||||
|
$content .= "<form method='post' action='?action=set-password' class='inline-form'>
|
||||||
|
<input type='hidden' name='user' value='$username' />
|
||||||
|
<input type='password' name='new-pass' placeholder='New password' />
|
||||||
|
<input type='submit' value='Reset Password' />
|
||||||
|
</form> | ";
|
||||||
|
$content .= "<a href='?action=user-delete&user=" . rawurlencode($username) . "'>Delete User</a>";
|
||||||
|
$content .= "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$content .= "</table>\n";
|
||||||
|
|
||||||
|
$content .= "<h3>Add User</h3>
|
||||||
|
<form method='post' action='?action=user-add'>
|
||||||
|
<input type='text' id='new-username' name='user' placeholder='Username' required />
|
||||||
|
<input type='email' id='new-email' name='email' placeholder='Email address - optional' />
|
||||||
|
<input type='submit' value='Add user' />
|
||||||
|
</form>";
|
||||||
|
|
||||||
|
exit(page_renderer::render_main("User Table - $settings->sitename", $content));
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {post} ?action=user-add Create a user account
|
||||||
|
* @apiName UserAdd
|
||||||
|
* @apiGroup Settings
|
||||||
|
* @apiPermission Moderator
|
||||||
|
*
|
||||||
|
* @apiParam {string} user The username for the new user.
|
||||||
|
* @apiParam {string} email Optional. Specifies the email address for the new user account.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ██ ██ ███████ ███████ ██████ █████ ██████ ██████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ███████ █████ ██████ █████ ███████ ██ ██ ██ ██
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██████ ███████ ███████ ██ ██ ██ ██ ██████ ██████
|
||||||
|
*/
|
||||||
|
add_action("user-add", function() {
|
||||||
|
global $settings, $env;
|
||||||
|
|
||||||
|
if(!$env->is_admin) {
|
||||||
|
http_response_code(401);
|
||||||
|
exit(page_renderer::render_main("Error: Unauthorised - Add User - $settings->sitename", "<p>Only moderators (or better) may create users. You could try <a href='?action=logout'>logging out</a> and then <a href='?action=login&returnto%2Findex.php%3Faction%3Duser-table'>logging in</a> again as a moderator, or alternatively visit the <a href='?action=user-list'>user list</a> instead, if that's what you're after.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($_POST["user"])) {
|
||||||
|
http_response_code(400);
|
||||||
|
header("content-type: text/plain");
|
||||||
|
exit("Error: No username specified in the 'user' post parameter.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_username = $_POST["user"];
|
||||||
|
$new_email = $_POST["email"] ?? null;
|
||||||
|
|
||||||
|
if(preg_match('/[^0-9a-zA-Z\-_]/', $new_username) !== 0) {
|
||||||
|
http_response_code(400);
|
||||||
|
exit(page_renderer::render_main("Error: Invalid Username - Add User - $settings->sitename", "<p>The username <code>" . htmlentities($new_username) . "</code> contains some invalid characters. Only <code>a-z</code>, <code>A-Z</code>, <code>0-9</code>, <code>-</code>, and <code>_</code> are allowed in usernames. <a href='javascript:window.history.back();'>Go back</a>.</p>"));
|
||||||
|
}
|
||||||
|
if(!empty($new_email) && !filter_var($new_email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
http_response_code(400);
|
||||||
|
exit(page_renderer::render_main("Error: Invalid Email Address - Add User - $settings->sitename", "<p>The email address <code>" . htmlentities($new_email) . "</code> appears to be invalid. <a href='javascript:window.history.back();'>Go back</a>.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_password = generate_password($settings->new_password_length);
|
||||||
|
|
||||||
|
$user_data = new stdClass();
|
||||||
|
$user_data->password = hash_password($new_password);
|
||||||
|
if(!empty($new_email))
|
||||||
|
$user_data->email = $new_email;
|
||||||
|
|
||||||
|
$settings->users->$new_username = $user_data;
|
||||||
|
|
||||||
|
if(!save_settings()) {
|
||||||
|
http_response_code(503);
|
||||||
|
exit(page_renderer::render_main("Error: Failed to save settings - Add User - $settings->sitename", "<p>$settings->sitename failed to save the new user's data to disk. Please contact $settings->admindetails_name for assistance (their email address can be found at the bottom of this page).</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$welcome_email_result = email_user($new_username, "Welcome!", "Welcome to $settings->sitename, {username}! $env->user has created you an account. Here are your details:
|
||||||
|
|
||||||
|
Url: " . substr(full_url(), 0, strrpos(full_url(), "?")) . "
|
||||||
|
Username: {username}
|
||||||
|
Password: $new_password
|
||||||
|
|
||||||
|
It is advised that you change your password as soon as you login. You can do this by clicking the cog next to your name once you've logged in, and scrolling to the 'change password' heading.
|
||||||
|
|
||||||
|
If you need any assistance, then the help page you can access at the bottom of every page on $settings->sitename has information on most aspects of $settings->sitename.
|
||||||
|
|
||||||
|
|
||||||
|
--$settings->sitename, powered by Pepperminty Wiki
|
||||||
|
https://github.com/sbrl/Pepperminty-Wiki/
|
||||||
|
");
|
||||||
|
|
||||||
|
$content = "<h2>Add User</h2>
|
||||||
|
<p>The new user was added to $settings->sitename sucessfully! Their details are as follows:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Username: <code>$new_username</code></li>";
|
||||||
|
if(!empty($new_email))
|
||||||
|
$content .= " <li>Email Address: <code>$new_email</code></li>\n";
|
||||||
|
if(!$welcome_email_result)
|
||||||
|
$content .= " <li>Password: <code>$new_password</code></li>\n";
|
||||||
|
$content .= "</ul>\n";
|
||||||
|
if($welcome_email_result)
|
||||||
|
$content .= "<p>An email has been sent to the email address given above containing their login details.</p>\n";
|
||||||
|
|
||||||
|
$content .= "<p><a href='?action=user-table'>Go back</a> to the user table.</p>\n";
|
||||||
|
|
||||||
|
http_response_code(201);
|
||||||
|
exit(page_renderer::render_main("Add User - $settings->sitename", $content));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {post} ?action=set-password Set a user's password
|
||||||
|
* @apiName UserAdd
|
||||||
|
* @apiGroup Settings
|
||||||
|
* @apiPermission Moderator
|
||||||
|
*
|
||||||
|
* @apiParam {string} user The username of the account to set the password for.
|
||||||
|
* @apiParam {string} new-pass The new password for the specified username.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ███████ ███████ ████████
|
||||||
|
* ██ ██ ██
|
||||||
|
* ███████ █████ ██ █████
|
||||||
|
* ██ ██ ██
|
||||||
|
* ███████ ███████ ██
|
||||||
|
*
|
||||||
|
* ██████ █████ ███████ ███████ ██ ██ ██████ ██████ ██████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██████ ███████ ███████ ███████ ██ █ ██ ██ ██ ██████ ██ ██
|
||||||
|
* ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ██ ███████ ███████ ███ ███ ██████ ██ ██ ██████
|
||||||
|
*/
|
||||||
|
add_action("set-password", function() {
|
||||||
|
global $env, $settings;
|
||||||
|
|
||||||
|
if(!$env->is_admin) {
|
||||||
|
http_response_400(401);
|
||||||
|
exit(page_renderer::render_main("Error - Set Password - $settings->sitename", "<p>Error: You aren't logged in as a moderator, so you don't have permission to set a user's password.</p>"));
|
||||||
|
}
|
||||||
|
if(empty($_POST["user"])) {
|
||||||
|
http_response_code(400);
|
||||||
|
exit(page_renderer::render_main("Error - Set Password - $settings->sitename", "<p>Error: No username was provided via the 'user' POST parameter.</p>"));
|
||||||
|
}
|
||||||
|
if(empty($_POST["new-pass"])) {
|
||||||
|
http_response_code(400);
|
||||||
|
exit(page_renderer::render_main("Error - Set Password - $settings->sitename", "<p>Error: No password was provided via the 'new-pass' POST parameter.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($settings->users->{$_POST["user"]})) {
|
||||||
|
http_response_code(404);
|
||||||
|
exit(page_renderer::render_main("User not found - Set Password - $settings->sitename", "<p>Error: No user called {$_POST["user"]} was found, so their password can't be set. Perhaps you forgot to create the user first?</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$settings->users->{$_POST["user"]}->password = hash_password($_POST["new-pass"]);
|
||||||
|
if(!save_settings()) {
|
||||||
|
http_response_code(503);
|
||||||
|
exit(page_renderer::render_main("Server Error - Set Password - $settings->sitename", "<p>Error: $settings->sitename couldn't save the settings back to disk! Nothing has been changed. Please context $settings->admindetails_name, whose email address can be found at the bottom of this page.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(page_renderer::render_main("Set Password - $settings->sitename", "<p>" . htmlentities($_POST["user"]) . "'s password has been set successfully. <a href='?action=user-table'>Go back</a> to the user table.</p>"));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {post} ?action=user-delete Delete a user account
|
||||||
|
* @apiName UserDelete
|
||||||
|
* @apiGroup Settings
|
||||||
|
* @apiPermission Moderator
|
||||||
|
*
|
||||||
|
* @apiParam {string} user The username of the account to delete. username.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ██ ██ ███████ ███████ ██████
|
||||||
|
* ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ ███████ █████ ██████ █████
|
||||||
|
* ██ ██ ██ ██ ██ ██
|
||||||
|
* ██████ ███████ ███████ ██ ██
|
||||||
|
*
|
||||||
|
* ██████ ███████ ██ ███████ ████████ ███████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██ ██ █████ ██ █████ ██ █████
|
||||||
|
* ██ ██ ██ ██ ██ ██ ██
|
||||||
|
* ██████ ███████ ███████ ███████ ██ ███████
|
||||||
|
*/
|
||||||
|
add_action("user-delete", function() {
|
||||||
|
global $env, $settings;
|
||||||
|
|
||||||
|
if(!$env->is_admin || !$env->is_logged_in) {
|
||||||
|
http_response_code(403);
|
||||||
|
exit(page_renderer::render_main("Error - Delete User - $settings->sitename", "<p>Error: You aren't logged in as a moderator, so you don't have permission to delete a user's account.</p>"));
|
||||||
|
}
|
||||||
|
if(empty($_GET["user"])) {
|
||||||
|
http_response_code(400);
|
||||||
|
exit(page_renderer::render_main("Error - Delete User - $settings->sitename", "<p>Error: No username was provided in the <code>user</code> POST variable.</p>"));
|
||||||
|
}
|
||||||
|
if(empty($settings->users->{$_GET["user"]})) {
|
||||||
|
http_response_code(404);
|
||||||
|
exit(page_renderer::render_main("User not found - Delete User - $settings->sitename", "<p>Error: No user called {$_GET["user"]} was found, so their account can't be delete. Perhaps you spelt their account name incorrectly?</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
email_user($_GET["user"], "Account Deletion", "Hello, {$_GET["user"]}!
|
||||||
|
|
||||||
|
This is a notification email from $settings->sitename, to let you know that $env->user has deleted your user account, so you won't be able to log in to your account anymore.
|
||||||
|
|
||||||
|
If this was done in error, then please contact a moderator, or $settings->admindetails_name ($settings->sitename's Administrator) - whose email address can be found at the bottom of every page on $settings->sitename.
|
||||||
|
|
||||||
|
--$settings->sitename
|
||||||
|
Powered by Pepperminty Wiki
|
||||||
|
|
||||||
|
(Received this email in error? Please contact $settings->sitename's administrator as detailed above, as replying to this email may or may not reach a human at the other end)");
|
||||||
|
|
||||||
|
// Actually delete the account
|
||||||
|
unset($settings->users->{$_GET["user"]});
|
||||||
|
|
||||||
|
if(!save_settings()) {
|
||||||
|
http_response_code(503);
|
||||||
|
exit(page_renderer::render_main("Server Error - Delete User - $settings->sitename", "<p>Error: $settings->sitename couldn't save the settings back to disk! Nothing has been changed. Please context $settings->admindetails_name, whose email address can be found at the bottom of this page.</p>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(page_renderer::render_main("Delete User - $settings->sitename", "<p>" . htmlentities($_GET["user"]) . "'s account has been deleted successfully. <a href='?action=user-table'>Go back</a> to the user table.</p>"));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if($env->is_admin) add_help_section("949-user-table", "Managing User Accounts", "<p>As a moderator on $settings->sitename, you can use the <a href='?action=user-table'>User Table</a> to adminstrate the user accounts on $settings->sitename. It allows you to perform actions such as adding and removing accounts, and resetting passwords.</p>");
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
/**
|
||||||
|
* Generates a new (cryptographically secure) random password that's also readable (i.e. consonant-vowel-consonant).
|
||||||
|
* This implementation may be changed in the future to use random dictionary words instead - ref https://xkcd.com/936/
|
||||||
|
* @param string $length The length of password to generate.
|
||||||
|
* @return string The generated random password.
|
||||||
|
*/
|
||||||
|
function generate_password($length) {
|
||||||
|
$vowels = "aeiou";
|
||||||
|
$consonants = "bcdfghjklmnpqrstvwxyz";
|
||||||
|
$result = "";
|
||||||
|
for($i = 0; $i < $length; $i++) {
|
||||||
|
if($i % 2 == 0)
|
||||||
|
$result .= $consonants[random_int(0, strlen($consonants) - 1)];
|
||||||
|
else
|
||||||
|
$result .= $vowels[random_int(0, strlen($vowels) - 1)];
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Credits",
|
"name" => "Credits",
|
||||||
"version" => "0.7.7",
|
"version" => "0.7.9",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds the credits page. You *must* have this module :D",
|
"description" => "Adds the credits page. You *must* have this module :D",
|
||||||
"id" => "page-credits",
|
"id" => "page-credits",
|
||||||
|
@ -69,6 +69,12 @@ register_module([
|
||||||
"thing_url" => "",
|
"thing_url" => "",
|
||||||
"icon" => "https://avatars2.githubusercontent.com/u/7314006?v=3&s=24"
|
"icon" => "https://avatars2.githubusercontent.com/u/7314006?v=3&s=24"
|
||||||
],
|
],
|
||||||
|
"More Bug Reports (default credentials + downloader; via Gitter)" => [
|
||||||
|
"author" => "Tyler Spivey",
|
||||||
|
"author_url" => "https://github.com/tspivey/",
|
||||||
|
"thing_url" => "",
|
||||||
|
"icon" => "https://avatars2.githubusercontent.com/u/709407?v=4&s=24"
|
||||||
|
],
|
||||||
"PR #135: Fix repeated page names on sidebar" => [
|
"PR #135: Fix repeated page names on sidebar" => [
|
||||||
"author" => "ikisler",
|
"author" => "ikisler",
|
||||||
"author_url" => "https://github.com/ikisler",
|
"author_url" => "https://github.com/ikisler",
|
||||||
|
@ -91,7 +97,7 @@ register_module([
|
||||||
"author" => "ProDigySML",
|
"author" => "ProDigySML",
|
||||||
"author_url" => "https://github.com/ProDigySML",
|
"author_url" => "https://github.com/ProDigySML",
|
||||||
"thing_url" => "https://github.com/sbrl/Pepperminty-Wiki/issues/152",
|
"thing_url" => "https://github.com/sbrl/Pepperminty-Wiki/issues/152",
|
||||||
"icon" => "https://starbeamrainbowlabs.com/images/placeholder/?width=24&height=24"
|
"icon" => "https://avatars3.githubusercontent.com/u/16996819?s=24&v=4"
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -102,7 +108,7 @@ register_module([
|
||||||
$credits_html .= " <li>";
|
$credits_html .= " <li>";
|
||||||
$credits_html .= "<a href='" . $author_details["thing_url"] . "'>$thing</a> by ";
|
$credits_html .= "<a href='" . $author_details["thing_url"] . "'>$thing</a> by ";
|
||||||
if(isset($author_details["icon"]))
|
if(isset($author_details["icon"]))
|
||||||
$credits_html .= "<img style='vertical-align: middle;' src='" . $author_details["icon"] . "' /> ";
|
$credits_html .= "<img class='logo small' style='vertical-align: middle;' src='" . $author_details["icon"] . "' /> ";
|
||||||
$credits_html .= "<a href='" . $author_details["author_url"] . "'>" . $author_details["author"] . "</a>";
|
$credits_html .= "<a href='" . $author_details["author_url"] . "'>" . $author_details["author"] . "</a>";
|
||||||
$credits_html .= "</li>\n";
|
$credits_html .= "</li>\n";
|
||||||
}
|
}
|
||||||
|
@ -136,7 +142,7 @@ register_module([
|
||||||
$credits_html
|
$credits_html
|
||||||
<h2>Site status</h2>
|
<h2>Site status</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>{$settings->admindisplaychar}Update</a>, <a href='?action=configure'>{$settings->admindisplaychar}Edit master settings</a>, <a href='?action=export'>Export as zip - Check for permission first</a>)</td></tr>
|
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>{$settings->admindisplaychar}Update</a>, <a href='?action=configure'>{$settings->admindisplaychar} 🔧 Edit master settings</a>, <a href='?action=user-table'>{$settings->admindisplaychar} 👥 Edit user table</a>, <a href='?action=export'>🏛 Export as zip - Check for permission first</a>)</td></tr>
|
||||||
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
||||||
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
||||||
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Page editor",
|
"name" => "Page editor",
|
||||||
"version" => "0.17.2",
|
"version" => "0.17.3",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
||||||
"id" => "page-edit",
|
"id" => "page-edit",
|
||||||
|
@ -138,9 +138,9 @@ register_module([
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= "<form method='post' name='edit-form' action='index.php?action=preview-edit&page=" . rawurlencode($env->page) . "' class='editform'>
|
$content .= "<button class='smartsave-restore' title=\"Only works if you haven't changed the editor's content already!\">Restore Locally Saved Content</button>
|
||||||
|
<form method='post' name='edit-form' action='index.php?action=preview-edit&page=" . rawurlencode($env->page) . "' class='editform'>
|
||||||
<input type='hidden' name='prev-content-hash' value='" . generate_page_hash(isset($old_pagetext) ? $old_pagetext : $pagetext) . "' />
|
<input type='hidden' name='prev-content-hash' value='" . generate_page_hash(isset($old_pagetext) ? $old_pagetext : $pagetext) . "' />
|
||||||
<button class='smartsave-restore' title=\"Only works if you haven't changed the editor's content already!\">Restore Locally Saved Content</button>
|
|
||||||
<textarea name='content' autofocus tabindex='1'>$pagetext</textarea>
|
<textarea name='content' autofocus tabindex='1'>$pagetext</textarea>
|
||||||
<pre class='fit-text-mirror'></pre>
|
<pre class='fit-text-mirror'></pre>
|
||||||
<input type='text' name='tags' value='" . htmlentities($page_tags, ENT_HTML5 | ENT_QUOTES) . "' placeholder='Enter some tags for the page here. Separate them with commas.' title='Enter some tags for the page here. Separate them with commas.' tabindex='2' />
|
<input type='text' name='tags' value='" . htmlentities($page_tags, ENT_HTML5 | ENT_QUOTES) . "' placeholder='Enter some tags for the page here. Separate them with commas.' title='Enter some tags for the page here. Separate them with commas.' tabindex='2' />
|
||||||
|
@ -531,10 +531,17 @@ DIFFSCRIPT;
|
||||||
<p>Editing is simple. The edit page has a sizeable box that contains a page's current contents. Once you are done altering it, add or change the comma separated list of tags in the field below the editor and then click save page.</p>
|
<p>Editing is simple. The edit page has a sizeable box that contains a page's current contents. Once you are done altering it, add or change the comma separated list of tags in the field below the editor and then click save page.</p>
|
||||||
<p>A reference to the syntax that $settings->sitename supports can be found below.</p>");
|
<p>A reference to the syntax that $settings->sitename supports can be found below.</p>");
|
||||||
|
|
||||||
add_help_section("17-user-pages", "User Pages", "<p>If you are logged in, $settings->sitename allocates you your own user page that only you can edit. On $settings->sitename, user pages are sub-pages of the <a href='?page=" . rawurlencode($settings->user_page_prefix) . "'>" . htmlentities($settings->user_page_prefix) . "</a> page, and each user page can have a nested structure of pages underneath it, just like a normal page. Your user page is located at <a href='?page=" . rawurlencode(get_user_pagename($env->user)) . "'>" . htmlentities(get_user_pagename($env->user)) . "</a>.</p>");
|
add_help_section("17-user-pages", "User Pages", "<p>If you are logged in, $settings->sitename allocates you your own user page that only you can edit. On $settings->sitename, user pages are sub-pages of the <a href='?page=" . rawurlencode($settings->user_page_prefix) . "'>" . htmlentities($settings->user_page_prefix) . "</a> page, and each user page can have a nested structure of pages underneath it, just like a normal page. Your user page is located at <a href='?page=" . rawurlencode(get_user_pagename($env->user)) . "'>" . htmlentities(get_user_pagename($env->user)) . "</a>. " .
|
||||||
|
(module_exists("page-user-list") ? "You can see a list of all the users on $settings->sitename and visit their user pages on the <a href='?action=user-list'>user list</a>." : "")
|
||||||
|
. "</p>");
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
/**
|
||||||
|
* Generates a unique hash of a page's content for edit conflict detection
|
||||||
|
* purposes.
|
||||||
|
* @param string $page_data The page text to hash.
|
||||||
|
* @return string A hash of the given page text.
|
||||||
|
*/
|
||||||
function generate_page_hash($page_data) {
|
function generate_page_hash($page_data) {
|
||||||
return sha1($page_data);
|
return sha1($page_data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Login",
|
"name" => "Login",
|
||||||
"version" => "0.8.5",
|
"version" => "0.9.2",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds a pair of actions (login and checklogin) that allow users to login. You need this one if you want your users to be able to login.",
|
"description" => "Adds a pair of actions (login and checklogin) that allow users to login. You need this one if you want your users to be able to login.",
|
||||||
"id" => "page-login",
|
"id" => "page-login",
|
||||||
|
@ -92,14 +92,32 @@ register_module([
|
||||||
// The user wants to log in
|
// The user wants to log in
|
||||||
$user = $_POST["user"];
|
$user = $_POST["user"];
|
||||||
$pass = $_POST["pass"];
|
$pass = $_POST["pass"];
|
||||||
if($settings->users->$user->password == hash_password($pass))
|
if(!empty($settings->users->$user) && verify_password($pass, $settings->users->$user->password))
|
||||||
{
|
{
|
||||||
// Success! :D
|
// Success! :D
|
||||||
|
|
||||||
|
// Update the environment
|
||||||
$env->is_logged_in = true;
|
$env->is_logged_in = true;
|
||||||
$expiretime = time() + 60*60*24*30; // 30 days from now
|
$env->user = $user;
|
||||||
|
$env->user_data = $settings->users->{$env->user};
|
||||||
|
|
||||||
|
$new_password_hash = hash_password_update($pass, $settings->users->$user->password);
|
||||||
|
|
||||||
|
// Update the password hash
|
||||||
|
if($new_password_hash !== null) {
|
||||||
|
$env->user_data->password = $new_password_hash;
|
||||||
|
if(!save_userdata()) {
|
||||||
|
http_response_code(503);
|
||||||
|
exit(page_renderer::render_main("Login Error - $settings->sitename", "<p>Your credentials were correct, but $settings->sitename was unable to log you in as an updated hash of your password couldn't be saved. Updating your password hash to the latest and strongest hashing algorithm is an important part of keeping your account secure.</p>
|
||||||
|
<p>Please contact $settings->admindetails_name, $settings->sitename's adminstrator, for assistance (their email address can be found at the bottom of every page, including this one).</p>"));
|
||||||
|
}
|
||||||
|
error_log("[Pepperminty Wiki] Updated password hash for $user.");
|
||||||
|
}
|
||||||
|
|
||||||
$_SESSION["$settings->sessionprefix-user"] = $user;
|
$_SESSION["$settings->sessionprefix-user"] = $user;
|
||||||
$_SESSION["$settings->sessionprefix-pass"] = hash_password($pass);
|
$_SESSION["$settings->sessionprefix-pass"] = $new_password_hash ?? hash_password($pass);
|
||||||
$_SESSION["$settings->sessionprefix-expiretime"] = $expiretime;
|
$_SESSION["$settings->sessionprefix-expiretime"] = time() + 60*60*24*30; // 30 days from now
|
||||||
|
|
||||||
// Redirect to wherever the user was going
|
// Redirect to wherever the user was going
|
||||||
http_response_code(302);
|
http_response_code(302);
|
||||||
header("x-login-success: yes");
|
header("x-login-success: yes");
|
||||||
|
@ -132,12 +150,82 @@ register_module([
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
add_action("hash-cost-test", function() {
|
||||||
|
global $env;
|
||||||
|
|
||||||
|
header("content-type: text/plain");
|
||||||
|
|
||||||
|
if(!$env->is_logged_in || !$env->is_admin) {
|
||||||
|
http_response_code(401);
|
||||||
|
exit("Error: Only moderators are allowed to use this action.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$time_compute = microtime(true);
|
||||||
|
$cost = hash_password_compute_cost(true);
|
||||||
|
$time_compute = (microtime(true) - $time_compute)*1000;
|
||||||
|
|
||||||
|
$time_cost = microtime(true);
|
||||||
|
password_hash("testing", PASSWORD_DEFAULT, [ "cost" => $cost ]);
|
||||||
|
$time_cost = (microtime(true) - $time_cost)*1000;
|
||||||
|
|
||||||
|
echo("Calculated cost: $cost ({$time_cost}ms)\n");
|
||||||
|
echo("Time taken: {$time_compute}ms\n");
|
||||||
|
exit(date("r"));
|
||||||
|
});
|
||||||
|
|
||||||
// Register a section on logging in on the help page.
|
// Register a section on logging in on the help page.
|
||||||
add_help_section("30-login", "Logging in", "<p>In order to edit $settings->sitename and have your edit attributed to you, you need to be logged in. Depending on the settings, logging in may be a required step if you want to edit at all. Thankfully, loggging in is not hard. Simply click the "Login" link in the top left, type your username and password, and then click login.</p>
|
add_help_section("30-login", "Logging in", "<p>In order to edit $settings->sitename and have your edit attributed to you, you need to be logged in. Depending on the settings, logging in may be a required step if you want to edit at all. Thankfully, loggging in is not hard. Simply click the "Login" link in the top left, type your username and password, and then click login.</p>
|
||||||
<p>If you do not have an account yet and would like one, try contacting <a href='mailto:" . hide_email($settings->admindetails_email) . "'>$settings->admindetails_name</a>, $settings->sitename's administrator and ask them nicely to see if they can create you an account.</p>");
|
<p>If you do not have an account yet and would like one, try contacting <a href='mailto:" . hide_email($settings->admindetails_email) . "'>$settings->admindetails_name</a>, $settings->sitename's administrator and ask them nicely to see if they can create you an account.</p>");
|
||||||
|
|
||||||
|
// Re-check the password hashing cost, if necessary
|
||||||
|
do_password_hash_code_update();
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recalculates and updates the password hashing cost.
|
||||||
|
*/
|
||||||
|
function do_password_hash_code_update() {
|
||||||
|
global $settings, $paths;
|
||||||
|
|
||||||
|
// There's no point if we're using Argon2i, as it doesn't take a cost
|
||||||
|
if(hash_password_properties()["algorithm"] == PASSWORD_ARGON2I)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Skip rechecking if the automatic check has been disabled
|
||||||
|
if($settings->password_cost_time_interval == -1)
|
||||||
|
return;
|
||||||
|
// Skip the recheck if we've done one recently
|
||||||
|
if(isset($settings->password_cost_time_lastcheck) &&
|
||||||
|
time() - $settings->password_cost_time_lastcheck < $settings->password_cost_time_interval)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$new_cost = hash_password_compute_cost();
|
||||||
|
|
||||||
|
// Save the new cost, but only if it's higher than the old one
|
||||||
|
if($new_cost > $settings->password_cost)
|
||||||
|
$settings->password_cost = $new_cost;
|
||||||
|
// Save the current time in the settings
|
||||||
|
$settings->password_cost_time_lastcheck = time();
|
||||||
|
file_put_contents($paths->settings_file, json_encode($settings, JSON_PRETTY_PRINT));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Figures out the appropriate algorithm & options for hashing passwords based
|
||||||
|
* on the current settings.
|
||||||
|
* @return array The appropriate password hashing algorithm and options.
|
||||||
|
*/
|
||||||
|
function hash_password_properties() {
|
||||||
|
global $settings;
|
||||||
|
|
||||||
|
$result = [
|
||||||
|
"algorithm" => constant($settings->password_algorithm),
|
||||||
|
"options" => [ "cost" => $settings->password_cost ]
|
||||||
|
];
|
||||||
|
if(defined("PASSWORD_ARGON2I") && $result["algorithm"] == PASSWORD_ARGON2I)
|
||||||
|
$result["options"] = [];
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Hashes the given password according to the current settings defined
|
* Hashes the given password according to the current settings defined
|
||||||
* in $settings.
|
* in $settings.
|
||||||
|
@ -147,18 +235,65 @@ register_module([
|
||||||
* @return string The hashed password. Uses sha3 if $settings->use_sha3 is
|
* @return string The hashed password. Uses sha3 if $settings->use_sha3 is
|
||||||
* enabled, or sha256 otherwise.
|
* enabled, or sha256 otherwise.
|
||||||
*/
|
*/
|
||||||
function hash_password($pass)
|
function hash_password($pass) {
|
||||||
{
|
$props = hash_password_properties();
|
||||||
global $settings;
|
return password_hash(
|
||||||
if($settings->use_sha3)
|
base64_encode(hash("sha384", $pass)),
|
||||||
{
|
$props["algorithm"],
|
||||||
return sha3($pass, 256);
|
$props["options"]
|
||||||
}
|
);
|
||||||
else
|
}
|
||||||
{
|
/**
|
||||||
return hash("sha256", $pass);
|
* Verifies a user's password against a pre-generated hash.
|
||||||
}
|
* @param string $pass The user's password.
|
||||||
|
* @param string $hash The hash to compare against.
|
||||||
|
* @return bool Whether the password matches the has or not.
|
||||||
|
*/
|
||||||
|
function verify_password($pass, $hash) {
|
||||||
|
$pass_transformed = base64_encode(hash("sha384", $pass));
|
||||||
|
return password_verify($pass_transformed, $hash);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Determines if the provided password needs re-hashing or not.
|
||||||
|
* @param string $pass The password to check.
|
||||||
|
* @param string $hash The hash of the provided password to check.
|
||||||
|
* @return string|null Returns null if an updaste is not required - otherwise returns the new updated hash.
|
||||||
|
*/
|
||||||
|
function hash_password_update($pass, $hash) {
|
||||||
|
$props = hash_password_properties();
|
||||||
|
if(password_needs_rehash($hash, $props["algorithm"], $props["options"])) {
|
||||||
|
return hash_password($pass);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Computes the appropriate cost value for password_hash based on the settings
|
||||||
|
* automatically.
|
||||||
|
* Starts at 10 and works upwards in increments of 1. Goes on until a value is
|
||||||
|
* found that's greater than the target - or 10x the target time elapses.
|
||||||
|
* @return integer The automatically calculated password hashing cost.
|
||||||
|
*/
|
||||||
|
function hash_password_compute_cost($verbose = false) {
|
||||||
|
global $settings;
|
||||||
|
$props = hash_password_properties();
|
||||||
|
if($props["algorithm"] == PASSWORD_ARGON2I)
|
||||||
|
return null;
|
||||||
|
$props["options"]["cost"] = 10;
|
||||||
|
|
||||||
|
$target_cost_time = $settings->password_cost_time / 1000; // The setting is in ms
|
||||||
|
|
||||||
|
do {
|
||||||
|
$props["options"]["cost"]++;
|
||||||
|
$start_i = microtime(true);
|
||||||
|
password_hash("testing", $props["algorithm"], $props["options"]);
|
||||||
|
$end_i = microtime(true);
|
||||||
|
if($verbose) echo("Attempt | cost = {$props["options"]["cost"]}, time = " . ($end_i - $start_i)*1000 . "ms\n");
|
||||||
|
// Iterate until we find a cost high enough
|
||||||
|
// ....but don't keep going forever - try for at most 10x the target
|
||||||
|
// time in total (in case the specified algorithm doesn't take a
|
||||||
|
// cost parameter)
|
||||||
|
} while($end_i - $start_i < $target_cost_time);
|
||||||
|
|
||||||
|
return $props["options"]["cost"];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Logout",
|
"name" => "Logout",
|
||||||
"version" => "0.6",
|
"version" => "0.6.1",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds an action to let users user out. For security reasons it is wise to add this module since logging in automatically opens a session that is valid for 30 days.",
|
"description" => "Adds an action to let users user out. For security reasons it is wise to add this module since logging in automatically opens a session that is valid for 30 days.",
|
||||||
"id" => "page-logout",
|
"id" => "page-logout",
|
||||||
|
@ -26,7 +26,7 @@ register_module([
|
||||||
global $env;
|
global $env;
|
||||||
$env->is_logged_in = false;
|
$env->is_logged_in = false;
|
||||||
unset($env->user);
|
unset($env->user);
|
||||||
unset($env->pass);
|
unset($env->user_data);
|
||||||
//clear the session variables
|
//clear the session variables
|
||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Parsedown",
|
"name" => "Parsedown",
|
||||||
"version" => "0.9.11",
|
"version" => "0.9.12",
|
||||||
"author" => "Emanuil Rusev & Starbeamrainbowlabs",
|
"author" => "Emanuil Rusev & Starbeamrainbowlabs",
|
||||||
"description" => "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
|
"description" => "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
|
||||||
"id" => "parser-parsedown",
|
"id" => "parser-parsedown",
|
||||||
|
@ -168,7 +168,7 @@ register_module([
|
||||||
<tr><td><code>[[Internal link]]</code></td><td><a href='?page=Internal%20link'>Internal Link</a></td><td>An internal link.</td></tr>
|
<tr><td><code>[[Internal link]]</code></td><td><a href='?page=Internal%20link'>Internal Link</a></td><td>An internal link.</td></tr>
|
||||||
<tr><td><code>[[Display Text|Internal link]]</code></td><td><a href='?page=Internal%20link'>Display Text</a></td><td>An internal link with some display text.</td></tr>
|
<tr><td><code>[[Display Text|Internal link]]</code></td><td><a href='?page=Internal%20link'>Display Text</a></td><td>An internal link with some display text.</td></tr>
|
||||||
<tr><td><code>![Alt text](http://example.com/path/to/image.png | 256x256 | right)</code></td><td><img src='http://example.com/path/to/image.png' alt='Alt text' style='float: right; max-width: 256px; max-height: 256px;' /></td><td>An image floating to the right of the page that fits inside a 256px x 256px box, preserving aspect ratio.</td></tr>
|
<tr><td><code>![Alt text](http://example.com/path/to/image.png | 256x256 | right)</code></td><td><img src='http://example.com/path/to/image.png' alt='Alt text' style='float: right; max-width: 256px; max-height: 256px;' /></td><td>An image floating to the right of the page that fits inside a 256px x 256px box, preserving aspect ratio.</td></tr>
|
||||||
<tr><td><code>![Alt text](http://example.com/path/to/image.png | 256x256 | caption)</code></td><td><figure><img src='http://example.com/path/to/image.png' alt='Alt text' style='max-width: 256px; max-height: 256px;' /><figcaption>Alt text</figcaption></figure></td><td>An image with a caption that fits inside a 256px x 256px box, preserving aspect ratio. The caption is taken from the alt text.</td></tr>
|
<tr><td><code>![Alt text](http://example.com/path/to/image.png | 256x256 | caption)</code></td><td><figure><img src='http://example.com/path/to/image.png' alt='Alt text' style='max-width: 256px; max-height: 256px;' /><figcaption>Alt text</figcaption></figure></td><td>An image with a caption that fits inside a 256px x 256px box, preserving aspect ratio. The presence of the word <code>caption</code> in the regular braces causes the alt text to be taken and displayed below the image itself.</td></tr>
|
||||||
<tr><td><code>![Alt text](Files/Cheese.png)</code></td><td><img src='index.php?action=preview&page=Files/Cheese.png' alt='Alt text' style='' /></td><td>An example of the short url syntax for images. Simply enter the page name of an image (or video / audio file), and Pepperminty Wiki will sort out the url for you.</td></tr>
|
<tr><td><code>![Alt text](Files/Cheese.png)</code></td><td><img src='index.php?action=preview&page=Files/Cheese.png' alt='Alt text' style='' /></td><td>An example of the short url syntax for images. Simply enter the page name of an image (or video / audio file), and Pepperminty Wiki will sort out the url for you.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<p>Note that the all image image syntax above can be mixed and matched to your liking. The <code>caption</code> option in particular must come last or next to last.</p>
|
<p>Note that the all image image syntax above can be mixed and matched to your liking. The <code>caption</code> option in particular must come last or next to last.</p>
|
||||||
|
@ -449,7 +449,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
{
|
{
|
||||||
global $pageindex, $env;
|
global $pageindex, $env;
|
||||||
|
|
||||||
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
||||||
{
|
{
|
||||||
$linkPage = trim($matches[1]);
|
$linkPage = trim($matches[1]);
|
||||||
$display = $linkPage . trim($matches[2]);
|
$display = $linkPage . trim($matches[2]);
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-247744307"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-814931189"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-247744307" class="accordion-body collapse in">
|
<div id="namespace-814931189" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,101 +1,102 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(php_sapi_name() == "cli")
|
if(php_sapi_name() == "cli")
|
||||||
{
|
{
|
||||||
echo("*** Beginning main build sequence ***\n");
|
echo("*** Beginning main build sequence ***\n");
|
||||||
echo("Reading in module index...\n");
|
echo("Reading in module index...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
$module_index = json_decode(file_get_contents("module_index.json"));
|
$module_index = json_decode(file_get_contents("module_index.json"));
|
||||||
$module_list = [];
|
$module_list = [];
|
||||||
foreach($module_index as $module)
|
foreach($module_index as $module)
|
||||||
{
|
{
|
||||||
// If the module is optional, the module's id isn't present in the command line arguments, and the special 'all' module id wasn't passed in, skip it
|
// If the module is optional, the module's id isn't present in the command line arguments, and the special 'all' module id wasn't passed in, skip it
|
||||||
if($module->optional &&
|
if($module->optional &&
|
||||||
(
|
(
|
||||||
isset($argv) &&
|
isset($argv) &&
|
||||||
strrpos(implode(" ", $argv), $module->id) === false &&
|
strrpos(implode(" ", $argv), $module->id) === false &&
|
||||||
!in_array("all", $argv)
|
!in_array("all", $argv)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
continue;
|
continue;
|
||||||
$module_list[] = $module->id;
|
$module_list[] = $module->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET["modules"]))
|
if(isset($_GET["modules"]))
|
||||||
{
|
{
|
||||||
$module_list = explode(",", $_GET["modules"]);
|
$module_list = explode(",", $_GET["modules"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(php_sapi_name() != "cli")
|
if(php_sapi_name() != "cli")
|
||||||
{
|
{
|
||||||
header("content-type: text/php");
|
header("content-type: text/php");
|
||||||
}
|
header("content-disposition: attachment; filename=\"index.php\"");
|
||||||
|
}
|
||||||
if(php_sapi_name() == "cli") echo("Reading in core files...");
|
|
||||||
|
if(php_sapi_name() == "cli") echo("Reading in core files...");
|
||||||
$core = file_get_contents("core.php");
|
|
||||||
$settings = file_get_contents("settings.fragment.php");
|
$core = file_get_contents("core.php");
|
||||||
$settings = str_replace([ "<?php", "?>" ], "", $settings);
|
$settings = file_get_contents("settings.fragment.php");
|
||||||
$core = str_replace([
|
$settings = str_replace([ "<?php", "?>" ], "", $settings);
|
||||||
"//{settings}",
|
$core = str_replace([
|
||||||
"{version}",
|
"//{settings}",
|
||||||
"{commit}",
|
"{version}",
|
||||||
"{guiconfig}",
|
"{commit}",
|
||||||
"{default-css}"
|
"{guiconfig}",
|
||||||
], [
|
"{default-css}"
|
||||||
$settings,
|
], [
|
||||||
trim(file_get_contents("version")),
|
$settings,
|
||||||
exec("git rev-parse HEAD"),
|
trim(file_get_contents("version")),
|
||||||
trim(file_get_contents("peppermint.guiconfig.json")),
|
exec("git rev-parse HEAD"),
|
||||||
trim(file_get_contents("theme_default.css"))
|
trim(file_get_contents("peppermint.guiconfig.json")),
|
||||||
], $core);
|
trim(file_get_contents("theme_default.css"))
|
||||||
|
], $core);
|
||||||
$result = $core;
|
|
||||||
|
$result = $core;
|
||||||
foreach($module_list as $module_id)
|
|
||||||
{
|
foreach($module_list as $module_id)
|
||||||
if($module_id == "") continue;
|
{
|
||||||
|
if($module_id == "") continue;
|
||||||
if(php_sapi_name() == "cli") echo("Adding $module_id\n");
|
|
||||||
|
if(php_sapi_name() == "cli") echo("Adding $module_id\n");
|
||||||
$module_filepath = "modules/" . preg_replace("[^a-zA-Z0-9\-]", "", $module_id) . ".php";
|
|
||||||
|
$module_filepath = "modules/" . preg_replace("[^a-zA-Z0-9\-]", "", $module_id) . ".php";
|
||||||
//echo("id: $module_id | filepath: $module_filepath\n");
|
|
||||||
|
//echo("id: $module_id | filepath: $module_filepath\n");
|
||||||
if(!file_exists($module_filepath))
|
|
||||||
{
|
if(!file_exists($module_filepath))
|
||||||
http_response_code(400);
|
{
|
||||||
exit("Failed to load module with name: $module_filepath");
|
http_response_code(400);
|
||||||
}
|
exit("Failed to load module with name: $module_filepath");
|
||||||
|
}
|
||||||
$modulecode = file_get_contents($module_filepath);
|
|
||||||
$modulecode = str_replace([ "<?php", "?>" ], "", $modulecode);
|
$modulecode = file_get_contents($module_filepath);
|
||||||
$result = str_replace(
|
$modulecode = str_replace([ "<?php", "?>" ], "", $modulecode);
|
||||||
"// %next_module% //",
|
$result = str_replace(
|
||||||
"$modulecode\n// %next_module% //",
|
"// %next_module% //",
|
||||||
$result);
|
"$modulecode\n// %next_module% //",
|
||||||
}
|
$result);
|
||||||
|
}
|
||||||
if(php_sapi_name() == "cli")
|
|
||||||
{
|
if(php_sapi_name() == "cli")
|
||||||
if(file_exists("build/index.php"))
|
{
|
||||||
{
|
if(file_exists("build/index.php"))
|
||||||
echo("index.php already exists in the build folder, exiting\n");
|
{
|
||||||
exit(1);
|
echo("index.php already exists in the build folder, exiting\n");
|
||||||
}
|
exit(1);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
echo("Done. Saving to disk...");
|
{
|
||||||
file_put_contents("build/index.php", $result);
|
echo("Done. Saving to disk...");
|
||||||
echo("complete!\n");
|
file_put_contents("build/index.php", $result);
|
||||||
echo("*** Build completed! ***\n");
|
echo("complete!\n");
|
||||||
}
|
echo("*** Build completed! ***\n");
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
exit($result);
|
{
|
||||||
}
|
exit($result);
|
||||||
|
}
|
||||||
?>
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1804044430"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-210781141"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1804044430" class="accordion-body collapse in">
|
<div id="namespace-210781141" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset='utf-8' />
|
<meta charset='utf-8' />
|
||||||
<title>peppermint.json configuration guide</title>
|
<title>peppermint.json configuration guide - Pepperminty Wiki</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> <code>peppermint.json</code> Configuration Guide</h1>
|
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> <code>peppermint.json</code> Configuration Guide</h1>
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -136,10 +136,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-186703378"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1342842430"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-186703378" class="accordion-body collapse in">
|
<div id="namespace-1342842430" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -35,7 +35,7 @@ if(!file_exists($settingsFilename))
|
||||||
foreach ($guiConfig as $key => $value)
|
foreach ($guiConfig as $key => $value)
|
||||||
$settings->$key = $value->default;
|
$settings->$key = $value->default;
|
||||||
// Generate a random secret
|
// Generate a random secret
|
||||||
$settings->secret = bin2hex(openssl_random_pseudo_bytes(16));
|
$settings->secret = bin2hex(random_bytes(16));
|
||||||
file_put_contents("peppermint.json", json_encode($settings, JSON_PRETTY_PRINT));
|
file_put_contents("peppermint.json", json_encode($settings, JSON_PRETTY_PRINT));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -64,8 +64,12 @@ if($settingsUpgraded)
|
||||||
$defaultCSS = <<<THEMECSS
|
$defaultCSS = <<<THEMECSS
|
||||||
{default-css}
|
{default-css}
|
||||||
THEMECSS;
|
THEMECSS;
|
||||||
if($settings->css === "auto")
|
|
||||||
$settings->css = $defaultCSS;
|
|
||||||
|
|
||||||
|
// This will automatically save to peppermint.json if an automatic takes place
|
||||||
|
// for another reason (such as password rehashing or user data updates), but it
|
||||||
|
// doesn't really matter because the site name isn't going to change all that
|
||||||
|
// often, and even if it does it shouldn't matter :P
|
||||||
|
if($settings->sessionprefix == "auto")
|
||||||
|
$settings->sessionprefix = "pepperminty-wiki-" . preg_replace('/[^a-z0-9\-_]/', "-", strtolower($settings->sitename));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -83,12 +83,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,52 +1,60 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
|
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
|
||||||
-->
|
-->
|
||||||
<!-- Title: G Pages: 1 -->
|
<!-- Title: G Pages: 1 -->
|
||||||
<svg width="383pt" height="312pt"
|
<svg width="383pt" height="312pt"
|
||||||
viewBox="0.00 0.00 382.69 312.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
viewBox="0.00 0.00 382.69 312.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 308)">
|
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 308)">
|
||||||
<title>G</title>
|
<title>G</title>
|
||||||
<polygon fill="white" stroke="none" points="-4,4 -4,-308 378.687,-308 378.687,4 -4,4"/>
|
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-308 378.6874,-308 378.6874,4 -4,4"/>
|
||||||
<g id="clust1" class="cluster"><title>cluster_Global</title>
|
<g id="clust1" class="cluster">
|
||||||
<path fill="none" stroke="gray" d="M217.687,-8C217.687,-8 354.687,-8 354.687,-8 360.687,-8 366.687,-14 366.687,-20 366.687,-20 366.687,-284 366.687,-284 366.687,-290 360.687,-296 354.687,-296 354.687,-296 217.687,-296 217.687,-296 211.687,-296 205.687,-290 205.687,-284 205.687,-284 205.687,-20 205.687,-20 205.687,-14 211.687,-8 217.687,-8"/>
|
<title>cluster_Global</title>
|
||||||
<text text-anchor="middle" x="286.187" y="-283.2" font-family="Times,serif" font-size="11.00" fill="gray">Global</text>
|
<path fill="none" stroke="#c0c0c0" d="M217.6874,-8C217.6874,-8 354.6874,-8 354.6874,-8 360.6874,-8 366.6874,-14 366.6874,-20 366.6874,-20 366.6874,-284 366.6874,-284 366.6874,-290 360.6874,-296 354.6874,-296 354.6874,-296 217.6874,-296 217.6874,-296 211.6874,-296 205.6874,-290 205.6874,-284 205.6874,-284 205.6874,-20 205.6874,-20 205.6874,-14 211.6874,-8 217.6874,-8"/>
|
||||||
|
<text text-anchor="middle" x="286.1874" y="-283.2" font-family="Times,serif" font-size="11.00" fill="#c0c0c0">Global</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\ids -->
|
<!-- \\ids -->
|
||||||
<g id="node1" class="node"><title>\\ids</title>
|
<g id="node1" class="node">
|
||||||
<polygon fill="none" stroke="black" points="313.187,-268 259.187,-268 259.187,-232 313.187,-232 313.187,-268"/>
|
<title>\\ids</title>
|
||||||
<text text-anchor="middle" x="286.187" y="-247.2" font-family="Courier,monospace" font-size="11.00">ids</text>
|
<polygon fill="none" stroke="#000000" points="313.1874,-268 259.1874,-268 259.1874,-232 313.1874,-232 313.1874,-268"/>
|
||||||
|
<text text-anchor="middle" x="286.1874" y="-247.2" font-family="Courier,monospace" font-size="11.00" fill="#000000">ids</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\page_renderer -->
|
<!-- \\page_renderer -->
|
||||||
<g id="node2" class="node"><title>\\page_renderer</title>
|
<g id="node2" class="node">
|
||||||
<polygon fill="none" stroke="black" points="338.187,-214 234.187,-214 234.187,-178 338.187,-178 338.187,-214"/>
|
<title>\\page_renderer</title>
|
||||||
<text text-anchor="middle" x="286.187" y="-193.2" font-family="Courier,monospace" font-size="11.00">page_renderer</text>
|
<polygon fill="none" stroke="#000000" points="338.1874,-214 234.1874,-214 234.1874,-178 338.1874,-178 338.1874,-214"/>
|
||||||
|
<text text-anchor="middle" x="286.1874" y="-193.2" font-family="Courier,monospace" font-size="11.00" fill="#000000">page_renderer</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\Slimdown -->
|
<!-- \\Slimdown -->
|
||||||
<g id="node3" class="node"><title>\\Slimdown</title>
|
<g id="node3" class="node">
|
||||||
<polygon fill="none" stroke="black" points="321.687,-160 250.687,-160 250.687,-124 321.687,-124 321.687,-160"/>
|
<title>\\Slimdown</title>
|
||||||
<text text-anchor="middle" x="286.187" y="-139.2" font-family="Courier,monospace" font-size="11.00">Slimdown</text>
|
<polygon fill="none" stroke="#000000" points="321.6874,-160 250.6874,-160 250.6874,-124 321.6874,-124 321.6874,-160"/>
|
||||||
|
<text text-anchor="middle" x="286.1874" y="-139.2" font-family="Courier,monospace" font-size="11.00" fill="#000000">Slimdown</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\PeppermintParsedown -->
|
<!-- \\PeppermintParsedown -->
|
||||||
<g id="node4" class="node"><title>\\PeppermintParsedown</title>
|
<g id="node4" class="node">
|
||||||
<polygon fill="none" stroke="black" points="358.687,-106 213.687,-106 213.687,-70 358.687,-70 358.687,-106"/>
|
<title>\\PeppermintParsedown</title>
|
||||||
<text text-anchor="middle" x="286.187" y="-85.2" font-family="Courier,monospace" font-size="11.00">PeppermintParsedown</text>
|
<polygon fill="none" stroke="#000000" points="358.6874,-106 213.6874,-106 213.6874,-70 358.6874,-70 358.6874,-106"/>
|
||||||
|
<text text-anchor="middle" x="286.1874" y="-85.2" font-family="Courier,monospace" font-size="11.00" fill="#000000">PeppermintParsedown</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\ParsedownExtra -->
|
<!-- \\ParsedownExtra -->
|
||||||
<g id="node6" class="node"><title>\\ParsedownExtra</title>
|
<g id="node6" class="node">
|
||||||
<ellipse fill="none" stroke="black" cx="70.8437" cy="-88" rx="70.6878" ry="18"/>
|
<title>\\ParsedownExtra</title>
|
||||||
<text text-anchor="middle" x="70.8437" y="-84.3" font-family="Times,serif" font-size="14.00" fill="gray">\ParsedownExtra</text>
|
<ellipse fill="none" stroke="#000000" cx="70.8437" cy="-88" rx="70.6878" ry="18"/>
|
||||||
|
<text text-anchor="middle" x="70.8437" y="-84.3" font-family="Times,serif" font-size="14.00" fill="#c0c0c0">\ParsedownExtra</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\PeppermintParsedown->\\ParsedownExtra -->
|
<!-- \\PeppermintParsedown->\\ParsedownExtra -->
|
||||||
<g id="edge1" class="edge"><title>\\PeppermintParsedown->\\ParsedownExtra</title>
|
<g id="edge1" class="edge">
|
||||||
<path fill="none" stroke="black" d="M213.554,-88C193.774,-88 172.187,-88 151.96,-88"/>
|
<title>\\PeppermintParsedown->\\ParsedownExtra</title>
|
||||||
<polygon fill="none" stroke="black" points="151.84,-84.5001 141.84,-88 151.84,-91.5001 151.84,-84.5001"/>
|
<path fill="none" stroke="#000000" d="M213.5821,-88C193.8401,-88 172.3325,-88 152.1431,-88"/>
|
||||||
|
<polygon fill="none" stroke="#000000" points="152.0379,-84.5001 142.0379,-88 152.0378,-91.5001 152.0379,-84.5001"/>
|
||||||
</g>
|
</g>
|
||||||
<!-- \\search -->
|
<!-- \\search -->
|
||||||
<g id="node5" class="node"><title>\\search</title>
|
<g id="node5" class="node">
|
||||||
<polygon fill="none" stroke="black" points="314.687,-52 257.687,-52 257.687,-16 314.687,-16 314.687,-52"/>
|
<title>\\search</title>
|
||||||
<text text-anchor="middle" x="286.187" y="-31.2" font-family="Courier,monospace" font-size="11.00">search</text>
|
<polygon fill="none" stroke="#000000" points="314.6874,-52 257.6874,-52 257.6874,-16 314.6874,-16 314.6874,-52"/>
|
||||||
|
<text text-anchor="middle" x="286.1874" y="-31.2" font-family="Courier,monospace" font-size="11.00" fill="#000000">search</text>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -58,12 +58,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="reports/errors.html">
|
<a href="reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="reports/markers.html">
|
<a href="reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -88,10 +88,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1656489921"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-334312880"></a>
|
||||||
<a href="namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1656489921" class="accordion-body collapse in">
|
<div id="namespace-334312880" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -434,6 +434,41 @@ action is requested.</p></td>
|
||||||
boolean
|
boolean
|
||||||
— <p>Whether the comment was found and deleted or not.</p>
|
— <p>Whether the comment was found and deleted or not.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_do_password_hash_code_update" name="method_do_password_hash_code_update" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">do_password_hash_code_update()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">do_password_hash_code_update() </pre>
|
||||||
|
<p><em>Recalculates and updates the password hashing cost.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<aside class="span4 detailsbar">
|
<aside class="span4 detailsbar">
|
||||||
|
@ -971,6 +1006,52 @@ false if it wasn't found.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_generate_password" name="method_generate_password" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">generate_password()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">generate_password(string <span class="argument">$length</span>) : string</pre>
|
||||||
|
<p><em>Generates a new (cryptographically secure) random password that's also readable (i.e. consonant-vowel-consonant).</em></p>
|
||||||
|
<p>This implementation may be changed in the future to use random dictionary words instead - ref <a href="https://xkcd.com/936/">https://xkcd.com/936/</a></p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$length </td>
|
||||||
|
<td><p>The length of password to generate.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
string
|
||||||
|
— <p>The generated random password.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_get_all_tags" name="method_get_all_tags" class="anchor"></a>
|
<a id="method_get_all_tags" name="method_get_all_tags" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">get_all_tags()</h3>
|
<h3 class=" ">get_all_tags()</h3>
|
||||||
|
@ -1570,6 +1651,144 @@ enabled, or sha256 otherwise.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_compute_cost" name="method_hash_password_compute_cost" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_compute_cost()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_compute_cost( <span class="argument">$verbose = false</span>) : integer</pre>
|
||||||
|
<p><em>Computes the appropriate cost value for password_hash based on the settings
|
||||||
|
automatically.</em></p>
|
||||||
|
<p>Starts at 10 and works upwards in increments of 1. Goes on until a value is
|
||||||
|
found that's greater than the target - or 10x the target time elapses.</p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>$verbose </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
integer
|
||||||
|
— <p>The automatically calculated password hashing cost.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_properties" name="method_hash_password_properties" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_properties()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_properties() : array</pre>
|
||||||
|
<p><em>Figures out the appropriate algorithm & options for hashing passwords based
|
||||||
|
on the current settings.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
array
|
||||||
|
— <p>The appropriate password hashing algorithm and options.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_update" name="method_hash_password_update" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_update()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_update(string <span class="argument">$pass</span>, string <span class="argument">$hash</span>) : string|null</pre>
|
||||||
|
<p><em>Determines if the provided password needs re-hashing or not.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pass </td>
|
||||||
|
<td><p>The password to check.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$hash </td>
|
||||||
|
<td><p>The hash of the provided password to check.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
string|null
|
||||||
|
— <p>Returns null if an updaste is not required - otherwise returns the new updated hash.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_hide_email" name="method_hide_email" class="anchor"></a>
|
<a id="method_hide_email" name="method_hide_email" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">hide_email()</h3>
|
<h3 class=" ">hide_email()</h3>
|
||||||
|
@ -1616,7 +1835,7 @@ enabled, or sha256 otherwise.</p>
|
||||||
todo
|
todo
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<p>Make this moree clevererer :D</p>
|
<p>Make this more clevererer :D</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1629,31 +1848,39 @@ enabled, or sha256 otherwise.</p>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">history_add_revision()</h3>
|
<h3 class=" ">history_add_revision()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">history_add_revision( <span class="argument">$pageinfo</span>, <span class="argument">$newsource</span>, <span class="argument">$oldsource</span>, <span class="argument">$save_pageindex = true</span>) </pre>
|
<pre class="signature" style="margin-right: 54px;">history_add_revision(object <span class="argument">$pageinfo</span>, string <span class="argument">$newsource</span>, string <span class="argument">$oldsource</span>, boolean <span class="argument">$save_pageindex = true</span>, string <span class="argument">$change_type = "edit"</span>) </pre>
|
||||||
<p><em></em></p>
|
<p><em>Adds a history revision against a page.</em></p>
|
||||||
|
<p>Note: Does not updaate the current page content! This function <em>only</em>
|
||||||
|
records a new revision against a page name. Thus it is possible to have a
|
||||||
|
disparaty between the history revisions and the actual content displayed in
|
||||||
|
the current revision if you're not careful!</p>
|
||||||
|
|
||||||
<h4>Parameters</h4>
|
<h4>Parameters</h4>
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>object</td>
|
||||||
<td>$pageinfo </td>
|
<td>$pageinfo </td>
|
||||||
<td></td>
|
<td><p>The pageindex object of the page to operate on.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>string</td>
|
||||||
<td>$newsource </td>
|
<td>$newsource </td>
|
||||||
<td></td>
|
<td><p>The page content to save as the new revision.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>string</td>
|
||||||
<td>$oldsource </td>
|
<td>$oldsource </td>
|
||||||
<td></td>
|
<td><p>The old page content that is the current revision (before the update).</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>boolean</td>
|
||||||
<td>$save_pageindex </td>
|
<td>$save_pageindex </td>
|
||||||
<td></td>
|
<td><p>Whether the page index should be saved to disk.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$change_type </td>
|
||||||
|
<td><p>The type of change to record this as in the history revision log</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -2580,12 +2807,50 @@ at which the comments are being rendered.</p></td>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_save_settings" name="method_save_settings" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">save_settings()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">save_settings() : boolean</pre>
|
||||||
|
<p><em>Saves the settings file back to peppermint.json.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>Whether the settings were saved successfully.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
|
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">save_userdata()</h3>
|
<h3 class=" ">save_userdata()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
|
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
|
||||||
<p><em>Saves the currently logged in uesr's data back to peppermint.json.</em></p>
|
<p><em>Saves the currently logged in user's data back to peppermint.json.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3181,6 +3446,55 @@ listed to be cacnonical.</em></p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_update_redirect_metadata" name="method_update_redirect_metadata" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">update_redirect_metadata()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">update_redirect_metadata(object <span class="argument">$index_entry</span>, string <span class="argument">$pagedata</span>) </pre>
|
||||||
|
<p><em>Updates the metadata associated with redirects in the pageindex entry
|
||||||
|
specified utilising the provided page content.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>object</td>
|
||||||
|
<td>$index_entry </td>
|
||||||
|
<td><p>The page index entry object to update.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pagedata </td>
|
||||||
|
<td><p>The page content to operate on.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_update_statistics" name="method_update_statistics" class="anchor"></a>
|
<a id="method_update_statistics" name="method_update_statistics" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">update_statistics()</h3>
|
<h3 class=" ">update_statistics()</h3>
|
||||||
|
@ -3421,6 +3735,57 @@ listed to be cacnonical.</em></p>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_verify_password" name="method_verify_password" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">verify_password()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">verify_password(string <span class="argument">$pass</span>, string <span class="argument">$hash</span>) : boolean</pre>
|
||||||
|
<p><em>Verifies a user's password against a pre-generated hash.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pass </td>
|
||||||
|
<td><p>The user's password.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$hash </td>
|
||||||
|
<td><p>The hash to compare against.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>Whether the password matches the has or not.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -3461,7 +3826,7 @@ listed to be cacnonical.</em></p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -58,12 +58,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -88,10 +88,10 @@
|
||||||
<div class="accordion" style="margin-bottom: 0">
|
<div class="accordion" style="margin-bottom: 0">
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1685199989"></a>
|
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-248321315"></a>
|
||||||
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="namespace-1685199989" class="accordion-body collapse in">
|
<div id="namespace-248321315" class="accordion-body collapse in">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
|
|
||||||
|
|
||||||
|
@ -434,6 +434,41 @@ action is requested.</p></td>
|
||||||
boolean
|
boolean
|
||||||
— <p>Whether the comment was found and deleted or not.</p>
|
— <p>Whether the comment was found and deleted or not.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_do_password_hash_code_update" name="method_do_password_hash_code_update" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">do_password_hash_code_update()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">do_password_hash_code_update() </pre>
|
||||||
|
<p><em>Recalculates and updates the password hashing cost.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<aside class="span4 detailsbar">
|
<aside class="span4 detailsbar">
|
||||||
|
@ -971,6 +1006,52 @@ false if it wasn't found.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_generate_password" name="method_generate_password" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">generate_password()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">generate_password(string <span class="argument">$length</span>) : string</pre>
|
||||||
|
<p><em>Generates a new (cryptographically secure) random password that's also readable (i.e. consonant-vowel-consonant).</em></p>
|
||||||
|
<p>This implementation may be changed in the future to use random dictionary words instead - ref <a href="https://xkcd.com/936/">https://xkcd.com/936/</a></p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$length </td>
|
||||||
|
<td><p>The length of password to generate.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
string
|
||||||
|
— <p>The generated random password.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_get_all_tags" name="method_get_all_tags" class="anchor"></a>
|
<a id="method_get_all_tags" name="method_get_all_tags" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">get_all_tags()</h3>
|
<h3 class=" ">get_all_tags()</h3>
|
||||||
|
@ -1570,6 +1651,144 @@ enabled, or sha256 otherwise.</p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_compute_cost" name="method_hash_password_compute_cost" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_compute_cost()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_compute_cost( <span class="argument">$verbose = false</span>) : integer</pre>
|
||||||
|
<p><em>Computes the appropriate cost value for password_hash based on the settings
|
||||||
|
automatically.</em></p>
|
||||||
|
<p>Starts at 10 and works upwards in increments of 1. Goes on until a value is
|
||||||
|
found that's greater than the target - or 10x the target time elapses.</p>
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>$verbose </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
integer
|
||||||
|
— <p>The automatically calculated password hashing cost.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_properties" name="method_hash_password_properties" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_properties()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_properties() : array</pre>
|
||||||
|
<p><em>Figures out the appropriate algorithm & options for hashing passwords based
|
||||||
|
on the current settings.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
array
|
||||||
|
— <p>The appropriate password hashing algorithm and options.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_hash_password_update" name="method_hash_password_update" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">hash_password_update()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">hash_password_update(string <span class="argument">$pass</span>, string <span class="argument">$hash</span>) : string|null</pre>
|
||||||
|
<p><em>Determines if the provided password needs re-hashing or not.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pass </td>
|
||||||
|
<td><p>The password to check.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$hash </td>
|
||||||
|
<td><p>The hash of the provided password to check.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
string|null
|
||||||
|
— <p>Returns null if an updaste is not required - otherwise returns the new updated hash.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_hide_email" name="method_hide_email" class="anchor"></a>
|
<a id="method_hide_email" name="method_hide_email" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">hide_email()</h3>
|
<h3 class=" ">hide_email()</h3>
|
||||||
|
@ -1616,7 +1835,7 @@ enabled, or sha256 otherwise.</p>
|
||||||
todo
|
todo
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<p>Make this moree clevererer :D</p>
|
<p>Make this more clevererer :D</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1629,31 +1848,39 @@ enabled, or sha256 otherwise.</p>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">history_add_revision()</h3>
|
<h3 class=" ">history_add_revision()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">history_add_revision( <span class="argument">$pageinfo</span>, <span class="argument">$newsource</span>, <span class="argument">$oldsource</span>, <span class="argument">$save_pageindex = true</span>) </pre>
|
<pre class="signature" style="margin-right: 54px;">history_add_revision(object <span class="argument">$pageinfo</span>, string <span class="argument">$newsource</span>, string <span class="argument">$oldsource</span>, boolean <span class="argument">$save_pageindex = true</span>, string <span class="argument">$change_type = "edit"</span>) </pre>
|
||||||
<p><em></em></p>
|
<p><em>Adds a history revision against a page.</em></p>
|
||||||
|
<p>Note: Does not updaate the current page content! This function <em>only</em>
|
||||||
|
records a new revision against a page name. Thus it is possible to have a
|
||||||
|
disparaty between the history revisions and the actual content displayed in
|
||||||
|
the current revision if you're not careful!</p>
|
||||||
|
|
||||||
<h4>Parameters</h4>
|
<h4>Parameters</h4>
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>object</td>
|
||||||
<td>$pageinfo </td>
|
<td>$pageinfo </td>
|
||||||
<td></td>
|
<td><p>The pageindex object of the page to operate on.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>string</td>
|
||||||
<td>$newsource </td>
|
<td>$newsource </td>
|
||||||
<td></td>
|
<td><p>The page content to save as the new revision.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>string</td>
|
||||||
<td>$oldsource </td>
|
<td>$oldsource </td>
|
||||||
<td></td>
|
<td><p>The old page content that is the current revision (before the update).</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>boolean</td>
|
||||||
<td>$save_pageindex </td>
|
<td>$save_pageindex </td>
|
||||||
<td></td>
|
<td><p>Whether the page index should be saved to disk.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$change_type </td>
|
||||||
|
<td><p>The type of change to record this as in the history revision log</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -2580,12 +2807,50 @@ at which the comments are being rendered.</p></td>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_save_settings" name="method_save_settings" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">save_settings()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">save_settings() : boolean</pre>
|
||||||
|
<p><em>Saves the settings file back to peppermint.json.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>Whether the settings were saved successfully.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
|
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">save_userdata()</h3>
|
<h3 class=" ">save_userdata()</h3>
|
||||||
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
|
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
|
||||||
<p><em>Saves the currently logged in uesr's data back to peppermint.json.</em></p>
|
<p><em>Saves the currently logged in user's data back to peppermint.json.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3181,6 +3446,55 @@ listed to be cacnonical.</em></p>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8 content class">
|
<div class="span8 content class">
|
||||||
|
<a id="method_update_redirect_metadata" name="method_update_redirect_metadata" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">update_redirect_metadata()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">update_redirect_metadata(object <span class="argument">$index_entry</span>, string <span class="argument">$pagedata</span>) </pre>
|
||||||
|
<p><em>Updates the metadata associated with redirects in the pageindex entry
|
||||||
|
specified utilising the provided page content.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>object</td>
|
||||||
|
<td>$index_entry </td>
|
||||||
|
<td><p>The page index entry object to update.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pagedata </td>
|
||||||
|
<td><p>The page content to operate on.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
<a id="method_update_statistics" name="method_update_statistics" class="anchor"></a>
|
<a id="method_update_statistics" name="method_update_statistics" class="anchor"></a>
|
||||||
<article class="method">
|
<article class="method">
|
||||||
<h3 class=" ">update_statistics()</h3>
|
<h3 class=" ">update_statistics()</h3>
|
||||||
|
@ -3421,6 +3735,57 @@ listed to be cacnonical.</em></p>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8 content class">
|
||||||
|
<a id="method_verify_password" name="method_verify_password" class="anchor"></a>
|
||||||
|
<article class="method">
|
||||||
|
<h3 class=" ">verify_password()</h3>
|
||||||
|
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
||||||
|
<pre class="signature" style="margin-right: 54px;">verify_password(string <span class="argument">$pass</span>, string <span class="argument">$hash</span>) : boolean</pre>
|
||||||
|
<p><em>Verifies a user's password against a pre-generated hash.</em></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$pass </td>
|
||||||
|
<td><p>The user's password.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>$hash </td>
|
||||||
|
<td><p>The hash to compare against.</p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Returns</h4>
|
||||||
|
boolean
|
||||||
|
— <p>Whether the password matches the has or not.</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<aside class="span4 detailsbar">
|
||||||
|
<h1><i class="icon-arrow-down"></i></h1>
|
||||||
|
<dl>
|
||||||
|
<dt>File</dt>
|
||||||
|
<dd><a href=""><div class="path-wrapper"></div></a></dd>
|
||||||
|
</dl>
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
package
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<p>Default</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -3461,7 +3826,7 @@ listed to be cacnonical.</em></p>
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -91,7 +91,8 @@
|
||||||
<li class="nav-header">Navigation</li>
|
<li class="nav-header">Navigation</li>
|
||||||
<li><a href="#peppermint-config-info.php"><i class="icon-file"></i> peppermint-config-info.php</a></li>
|
<li><a href="#peppermint-config-info.php"><i class="icon-file"></i> peppermint-config-info.php</a></li>
|
||||||
<li><a href="#modules/feature-recent-changes.php"><i class="icon-file"></i> modules/feature-recent-changes.php</a></li>
|
<li><a href="#modules/feature-recent-changes.php"><i class="icon-file"></i> modules/feature-recent-changes.php</a></li>
|
||||||
<li><a href="#modules/page-login.php"><i class="icon-file"></i> modules/page-login.php</a></li>
|
<li><a href="#modules/feature-user-table.php"><i class="icon-file"></i> modules/feature-user-table.php</a></li>
|
||||||
|
<li><a href="#modules/page-login.php"><i class="icon-file"></i> modules/page-login.php</a></li>
|
||||||
<li><a href="#modules/action-hash.php"><i class="icon-file"></i> modules/action-hash.php</a></li>
|
<li><a href="#modules/action-hash.php"><i class="icon-file"></i> modules/action-hash.php</a></li>
|
||||||
<li><a href="#modules/page-help.php"><i class="icon-file"></i> modules/page-help.php</a></li>
|
<li><a href="#modules/page-help.php"><i class="icon-file"></i> modules/page-help.php</a></li>
|
||||||
<li><a href="#modules/feature-redirect.php"><i class="icon-file"></i> modules/feature-redirect.php</a></li>
|
<li><a href="#modules/feature-redirect.php"><i class="icon-file"></i> modules/feature-redirect.php</a></li>
|
||||||
|
@ -188,10 +189,10 @@
|
||||||
<div class="package-contents">
|
<div class="package-contents">
|
||||||
</div>
|
</div>
|
||||||
<div class="package-contents">
|
<div class="package-contents">
|
||||||
<a name="modules/page-login.php" id="modules/page-login.php"></a>
|
<a name="modules/feature-user-table.php" id="modules/feature-user-table.php"></a>
|
||||||
<h3>
|
<h3>
|
||||||
<i class="icon-file"></i>
|
<i class="icon-file"></i>
|
||||||
modules/page-login.php
|
modules/feature-user-table.php
|
||||||
<small style="float: right;padding-right: 10px;">1</small>
|
<small style="float: right;padding-right: 10px;">1</small>
|
||||||
</h3>
|
</h3>
|
||||||
<div>
|
<div>
|
||||||
|
@ -211,6 +212,37 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="package-contents">
|
||||||
|
<a name="modules/page-login.php" id="modules/page-login.php"></a>
|
||||||
|
<h3>
|
||||||
|
<i class="icon-file"></i>
|
||||||
|
modules/page-login.php
|
||||||
|
<small style="float: right;padding-right: 10px;">2</small>
|
||||||
|
</h3>
|
||||||
|
<div>
|
||||||
|
<table class="table markers table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Line</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>error</td>
|
||||||
|
<td>0</td>
|
||||||
|
<td>No summary was found for this file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>error</td>
|
||||||
|
<td>276</td>
|
||||||
|
<td>Argument $verbose is missing from the Docblock of hash_password_compute_cost</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="package-contents">
|
<div class="package-contents">
|
||||||
|
@ -758,7 +790,7 @@
|
||||||
<h3>
|
<h3>
|
||||||
<i class="icon-file"></i>
|
<i class="icon-file"></i>
|
||||||
modules/feature-history.php
|
modules/feature-history.php
|
||||||
<small style="float: right;padding-right: 10px;">6</small>
|
<small style="float: right;padding-right: 10px;">1</small>
|
||||||
</h3>
|
</h3>
|
||||||
<div>
|
<div>
|
||||||
<table class="table markers table-bordered">
|
<table class="table markers table-bordered">
|
||||||
|
@ -774,31 +806,6 @@
|
||||||
<td>error</td>
|
<td>error</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>No summary was found for this file</td>
|
<td>No summary was found for this file</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>error</td>
|
|
||||||
<td>91</td>
|
|
||||||
<td>Argument $pageinfo is missing from the Docblock of history_add_revision</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>error</td>
|
|
||||||
<td>91</td>
|
|
||||||
<td>Argument $newsource is missing from the Docblock of history_add_revision</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>error</td>
|
|
||||||
<td>91</td>
|
|
||||||
<td>Argument $oldsource is missing from the Docblock of history_add_revision</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>error</td>
|
|
||||||
<td>91</td>
|
|
||||||
<td>Argument $save_pageindex is missing from the Docblock of history_add_revision</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>error</td>
|
|
||||||
<td>91</td>
|
|
||||||
<td>No summary for function \history_add_revision()</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1123,7 +1130,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/errors.html">
|
<a href="../reports/errors.html">
|
||||||
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">47</span>
|
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">44</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="../reports/markers.html">
|
<a href="../reports/markers.html">
|
||||||
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">6</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
<ul class="side-nav nav nav-list">
|
<ul class="side-nav nav nav-list">
|
||||||
<li class="nav-header">Navigation</li>
|
<li class="nav-header">Navigation</li>
|
||||||
<li><a href="#core.php"><i class="icon-file"></i> core.php</a></li>
|
<li><a href="#core.php"><i class="icon-file"></i> core.php</a></li>
|
||||||
<li><a href="#modules/page-edit.php"><i class="icon-file"></i> modules/page-edit.php</a></li>
|
<li><a href="#modules/page-edit.php"><i class="icon-file"></i> modules/page-edit.php</a></li>
|
||||||
<li><a href="#modules/feature-upload.php"><i class="icon-file"></i> modules/feature-upload.php</a></li>
|
<li><a href="#modules/feature-upload.php"><i class="icon-file"></i> modules/feature-upload.php</a></li>
|
||||||
<li><a href="#modules/feature-history.php"><i class="icon-file"></i> modules/feature-history.php</a></li>
|
<li><a href="#modules/feature-history.php"><i class="icon-file"></i> modules/feature-history.php</a></li>
|
||||||
<li><a href="#modules/feature-search.php"><i class="icon-file"></i> modules/feature-search.php</a></li>
|
<li><a href="#modules/feature-search.php"><i class="icon-file"></i> modules/feature-search.php</a></li>
|
||||||
|
@ -121,18 +121,18 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>TODO</td>
|
<td>TODO</td>
|
||||||
<td>377</td>
|
<td>361</td>
|
||||||
<td>Make this moree clevererer :D</td>
|
<td>Make this more clevererer :D</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>TODO</td>
|
<td>TODO</td>
|
||||||
<td>630</td>
|
<td>614</td>
|
||||||
<td>Identify which platforms don't have it and whether we still need this</td>
|
<td>Identify which platforms don't have it and whether we still need this</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="package-contents">
|
<div class="package-contents">
|
||||||
<a name="modules/page-edit.php" id="modules/page-edit.php"></a>
|
<a name="modules/page-edit.php" id="modules/page-edit.php"></a>
|
||||||
<h3>
|
<h3>
|
||||||
<i class="icon-file"></i>
|
<i class="icon-file"></i>
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>TODO</td>
|
<td>TODO</td>
|
||||||
<td>105</td>
|
<td>235</td>
|
||||||
<td>Store tag changes here
</td>
|
<td>Store tag changes here
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -214,7 +214,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>TODO</td>
|
<td>TODO</td>
|
||||||
<td>655</td>
|
<td>685</td>
|
||||||
<td>Remove this function and make everything streamable</td>
|
<td>Remove this function and make everything streamable</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
<section class="span10 offset1">
|
<section class="span10 offset1">
|
||||||
<hr />
|
<hr />
|
||||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
||||||
on May 5th, 2018 at 20:53.
|
on December 12th, 2018 at 23:20.
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
* [Getting Started](04-Getting-Started.md)
|
* [Getting Started](04-Getting-Started.md)
|
||||||
* [Getting a Copy](05-Getting-A-Copy.md)
|
* [Getting a Copy](05-Getting-A-Copy.md)
|
||||||
* [Configuration](06-Configuration.md)
|
* [Configuration](06-Configuration.md)
|
||||||
|
* [Writing Modules](07-Writing-Modules.md)
|
||||||
* References
|
* References
|
||||||
* [Configuration Settings](https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php)
|
* [Configuration Settings](https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php)
|
||||||
* [HTTP API](https://sbrl.github.io/Pepperminty-Wiki/docs/RestApi/)
|
* [HTTP API](https://sbrl.github.io/Pepperminty-Wiki/docs/RestApi/)
|
||||||
* [PHP Module API](https://sbrl.github.io/Pepperminty-Wiki/docs/ModuleApi/)
|
* [PHP Module API](https://sbrl.github.io/Pepperminty-Wiki/docs/ModuleApi/)
|
||||||
|
* [Making a Release](08-Making-A-Release.md)
|
||||||
|
|
|
@ -322,6 +322,61 @@ define({ "api": [
|
||||||
"filename": "./modules/page-edit.php",
|
"filename": "./modules/page-edit.php",
|
||||||
"groupTitle": "Editing"
|
"groupTitle": "Editing"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "get",
|
||||||
|
"url": "?action=history-revert&page={pageName}&revision={rid}",
|
||||||
|
"title": "Revert a page to a previous version",
|
||||||
|
"name": "HistoryRevert",
|
||||||
|
"group": "Editing",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "User",
|
||||||
|
"title": "Only users loggged in may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "revision",
|
||||||
|
"description": "<p>The page revision number to revert to.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "page",
|
||||||
|
"description": "<p>The page to operate on.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-history.php",
|
||||||
|
"groupTitle": "Editing",
|
||||||
|
"error": {
|
||||||
|
"fields": {
|
||||||
|
"Error 4xx": [
|
||||||
|
{
|
||||||
|
"group": "Error 4xx",
|
||||||
|
"optional": false,
|
||||||
|
"field": "UserNotLoggedInError",
|
||||||
|
"description": "<p>You didn't log in before sending this request.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Error 4xx",
|
||||||
|
"optional": false,
|
||||||
|
"field": "UserNotModeratorError",
|
||||||
|
"description": "<p>You weren't loggged in as a moderator before sending this request.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "post",
|
"type": "post",
|
||||||
"url": "?action=preview-edit&page={pageName}[&newpage=yes]",
|
"url": "?action=preview-edit&page={pageName}[&newpage=yes]",
|
||||||
|
@ -514,15 +569,15 @@ define({ "api": [
|
||||||
"group": "Parameter",
|
"group": "Parameter",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"field": "page",
|
"field": "format",
|
||||||
"description": "<p>The page name to return a revision list for.</p>"
|
"description": "<p>The format to return the list of pages in. available values: html, json, text. Default: html</p>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group": "Parameter",
|
"group": "Parameter",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"field": "format",
|
"field": "page",
|
||||||
"description": "<p>The format to return the list of pages in. available values: html, json, text. Default: html</p>"
|
"description": "<p>The page to operate on.</p>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -780,6 +835,23 @@ define({ "api": [
|
||||||
"filename": "./modules/page-view.php",
|
"filename": "./modules/page-view.php",
|
||||||
"groupTitle": "Page"
|
"groupTitle": "Page"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "get",
|
||||||
|
"url": "?action=opensearch-description",
|
||||||
|
"title": "Get the opensearch description file",
|
||||||
|
"name": "OpenSearchDescription",
|
||||||
|
"group": "Search",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Anonymous",
|
||||||
|
"title": "Anybody may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-search.php",
|
||||||
|
"groupTitle": "Search"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=suggest-pages[&type={type}]",
|
"url": "?action=suggest-pages[&type={type}]",
|
||||||
|
@ -817,23 +889,6 @@ define({ "api": [
|
||||||
"filename": "./modules/feature-search.php",
|
"filename": "./modules/feature-search.php",
|
||||||
"groupTitle": "Search"
|
"groupTitle": "Search"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "get",
|
|
||||||
"url": "?action=opensearch-description",
|
|
||||||
"title": "Get the opensearch description file",
|
|
||||||
"name": "OpenSearchDescription",
|
|
||||||
"group": "Search",
|
|
||||||
"permission": [
|
|
||||||
{
|
|
||||||
"name": "Anonymous",
|
|
||||||
"title": "Anybody may use this call.",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": "0.0.0",
|
|
||||||
"filename": "./modules/feature-search.php",
|
|
||||||
"groupTitle": "Search"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=search&query={text}[&format={format}]",
|
"url": "?action=search&query={text}[&format={format}]",
|
||||||
|
@ -1037,6 +1092,110 @@ define({ "api": [
|
||||||
"filename": "./modules/feature-user-preferences.php",
|
"filename": "./modules/feature-user-preferences.php",
|
||||||
"groupTitle": "Settings"
|
"groupTitle": "Settings"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "post",
|
||||||
|
"url": "?action=user-add",
|
||||||
|
"title": "Create a user account",
|
||||||
|
"name": "UserAdd",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "user",
|
||||||
|
"description": "<p>The username for the new user.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "email",
|
||||||
|
"description": "<p>Optional. Specifies the email address for the new user account.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "post",
|
||||||
|
"url": "?action=set-password",
|
||||||
|
"title": "Set a user's password",
|
||||||
|
"name": "UserAdd",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "user",
|
||||||
|
"description": "<p>The username of the account to set the password for.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "new-pass",
|
||||||
|
"description": "<p>The new password for the specified username.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "post",
|
||||||
|
"url": "?action=user-delete",
|
||||||
|
"title": "Delete a user account",
|
||||||
|
"name": "UserDelete",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "user",
|
||||||
|
"description": "<p>The username of the account to delete. username.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=user-preferences",
|
"url": "?action=user-preferences",
|
||||||
|
@ -1071,6 +1230,23 @@ define({ "api": [
|
||||||
"filename": "./modules/feature-user-preferences.php",
|
"filename": "./modules/feature-user-preferences.php",
|
||||||
"groupTitle": "Settings"
|
"groupTitle": "Settings"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "get",
|
||||||
|
"url": "?action=user-table",
|
||||||
|
"title": "Get the user table",
|
||||||
|
"name": "UserTable",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=recent-changes[&format={code}]",
|
"url": "?action=recent-changes[&format={code}]",
|
||||||
|
|
|
@ -322,6 +322,61 @@
|
||||||
"filename": "./modules/page-edit.php",
|
"filename": "./modules/page-edit.php",
|
||||||
"groupTitle": "Editing"
|
"groupTitle": "Editing"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "get",
|
||||||
|
"url": "?action=history-revert&page={pageName}&revision={rid}",
|
||||||
|
"title": "Revert a page to a previous version",
|
||||||
|
"name": "HistoryRevert",
|
||||||
|
"group": "Editing",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "User",
|
||||||
|
"title": "Only users loggged in may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "revision",
|
||||||
|
"description": "<p>The page revision number to revert to.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "page",
|
||||||
|
"description": "<p>The page to operate on.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-history.php",
|
||||||
|
"groupTitle": "Editing",
|
||||||
|
"error": {
|
||||||
|
"fields": {
|
||||||
|
"Error 4xx": [
|
||||||
|
{
|
||||||
|
"group": "Error 4xx",
|
||||||
|
"optional": false,
|
||||||
|
"field": "UserNotLoggedInError",
|
||||||
|
"description": "<p>You didn't log in before sending this request.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Error 4xx",
|
||||||
|
"optional": false,
|
||||||
|
"field": "UserNotModeratorError",
|
||||||
|
"description": "<p>You weren't loggged in as a moderator before sending this request.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "post",
|
"type": "post",
|
||||||
"url": "?action=preview-edit&page={pageName}[&newpage=yes]",
|
"url": "?action=preview-edit&page={pageName}[&newpage=yes]",
|
||||||
|
@ -514,15 +569,15 @@
|
||||||
"group": "Parameter",
|
"group": "Parameter",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"field": "page",
|
"field": "format",
|
||||||
"description": "<p>The page name to return a revision list for.</p>"
|
"description": "<p>The format to return the list of pages in. available values: html, json, text. Default: html</p>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group": "Parameter",
|
"group": "Parameter",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"field": "format",
|
"field": "page",
|
||||||
"description": "<p>The format to return the list of pages in. available values: html, json, text. Default: html</p>"
|
"description": "<p>The page to operate on.</p>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -780,6 +835,23 @@
|
||||||
"filename": "./modules/page-view.php",
|
"filename": "./modules/page-view.php",
|
||||||
"groupTitle": "Page"
|
"groupTitle": "Page"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "get",
|
||||||
|
"url": "?action=opensearch-description",
|
||||||
|
"title": "Get the opensearch description file",
|
||||||
|
"name": "OpenSearchDescription",
|
||||||
|
"group": "Search",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Anonymous",
|
||||||
|
"title": "Anybody may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-search.php",
|
||||||
|
"groupTitle": "Search"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=suggest-pages[&type={type}]",
|
"url": "?action=suggest-pages[&type={type}]",
|
||||||
|
@ -817,23 +889,6 @@
|
||||||
"filename": "./modules/feature-search.php",
|
"filename": "./modules/feature-search.php",
|
||||||
"groupTitle": "Search"
|
"groupTitle": "Search"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "get",
|
|
||||||
"url": "?action=opensearch-description",
|
|
||||||
"title": "Get the opensearch description file",
|
|
||||||
"name": "OpenSearchDescription",
|
|
||||||
"group": "Search",
|
|
||||||
"permission": [
|
|
||||||
{
|
|
||||||
"name": "Anonymous",
|
|
||||||
"title": "Anybody may use this call.",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": "0.0.0",
|
|
||||||
"filename": "./modules/feature-search.php",
|
|
||||||
"groupTitle": "Search"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=search&query={text}[&format={format}]",
|
"url": "?action=search&query={text}[&format={format}]",
|
||||||
|
@ -1037,6 +1092,110 @@
|
||||||
"filename": "./modules/feature-user-preferences.php",
|
"filename": "./modules/feature-user-preferences.php",
|
||||||
"groupTitle": "Settings"
|
"groupTitle": "Settings"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "post",
|
||||||
|
"url": "?action=user-add",
|
||||||
|
"title": "Create a user account",
|
||||||
|
"name": "UserAdd",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "user",
|
||||||
|
"description": "<p>The username for the new user.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "email",
|
||||||
|
"description": "<p>Optional. Specifies the email address for the new user account.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "post",
|
||||||
|
"url": "?action=set-password",
|
||||||
|
"title": "Set a user's password",
|
||||||
|
"name": "UserAdd",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "user",
|
||||||
|
"description": "<p>The username of the account to set the password for.</p>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "new-pass",
|
||||||
|
"description": "<p>The new password for the specified username.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "post",
|
||||||
|
"url": "?action=user-delete",
|
||||||
|
"title": "Delete a user account",
|
||||||
|
"name": "UserDelete",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameter": {
|
||||||
|
"fields": {
|
||||||
|
"Parameter": [
|
||||||
|
{
|
||||||
|
"group": "Parameter",
|
||||||
|
"type": "string",
|
||||||
|
"optional": false,
|
||||||
|
"field": "user",
|
||||||
|
"description": "<p>The username of the account to delete. username.</p>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=user-preferences",
|
"url": "?action=user-preferences",
|
||||||
|
@ -1071,6 +1230,23 @@
|
||||||
"filename": "./modules/feature-user-preferences.php",
|
"filename": "./modules/feature-user-preferences.php",
|
||||||
"groupTitle": "Settings"
|
"groupTitle": "Settings"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "get",
|
||||||
|
"url": "?action=user-table",
|
||||||
|
"title": "Get the user table",
|
||||||
|
"name": "UserTable",
|
||||||
|
"group": "Settings",
|
||||||
|
"permission": [
|
||||||
|
{
|
||||||
|
"name": "Moderator",
|
||||||
|
"title": "Only users loggged with a moderator account may use this call.",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.0.0",
|
||||||
|
"filename": "./modules/feature-user-table.php",
|
||||||
|
"groupTitle": "Settings"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get",
|
"type": "get",
|
||||||
"url": "?action=recent-changes[&format={code}]",
|
"url": "?action=recent-changes[&format={code}]",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
define({
|
define({
|
||||||
"name": "Pepperminty Wiki",
|
"name": "Pepperminty Wiki",
|
||||||
"version": "0.13.0",
|
"version": "0.17.1",
|
||||||
"description": "A wiki in a box. This is the API documentation.",
|
"description": "A wiki in a box. This is the API documentation.",
|
||||||
"title": "Pepperminty Wiki (0.13-dev)",
|
"title": "Pepperminty Wiki (0.13-dev)",
|
||||||
"sampleUrl": false,
|
"sampleUrl": false,
|
||||||
|
@ -8,8 +8,8 @@ define({
|
||||||
"apidoc": "0.3.0",
|
"apidoc": "0.3.0",
|
||||||
"generator": {
|
"generator": {
|
||||||
"name": "apidoc",
|
"name": "apidoc",
|
||||||
"time": "2018-05-05T20:53:47.285Z",
|
"time": "2018-12-12T23:23:12.972Z",
|
||||||
"url": "http://apidocjs.com",
|
"url": "http://apidocjs.com",
|
||||||
"version": "0.17.6"
|
"version": "0.17.7"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Pepperminty Wiki",
|
"name": "Pepperminty Wiki",
|
||||||
"version": "0.13.0",
|
"version": "0.17.1",
|
||||||
"description": "A wiki in a box. This is the API documentation.",
|
"description": "A wiki in a box. This is the API documentation.",
|
||||||
"title": "Pepperminty Wiki (0.13-dev)",
|
"title": "Pepperminty Wiki (0.13-dev)",
|
||||||
"sampleUrl": false,
|
"sampleUrl": false,
|
||||||
|
@ -8,8 +8,8 @@
|
||||||
"apidoc": "0.3.0",
|
"apidoc": "0.3.0",
|
||||||
"generator": {
|
"generator": {
|
||||||
"name": "apidoc",
|
"name": "apidoc",
|
||||||
"time": "2018-05-05T20:53:47.285Z",
|
"time": "2018-12-12T23:23:12.972Z",
|
||||||
"url": "http://apidocjs.com",
|
"url": "http://apidocjs.com",
|
||||||
"version": "0.17.6"
|
"version": "0.17.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
25
docs/RestApi/locales/cs.js
Normal file
25
docs/RestApi/locales/cs.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
define({
|
||||||
|
cs: {
|
||||||
|
'Allowed values:' : 'Povolené hodnoty:',
|
||||||
|
'Compare all with predecessor': 'Porovnat vše s předchozími verzemi',
|
||||||
|
'compare changes to:' : 'porovnat změny s:',
|
||||||
|
'compared to' : 'porovnat s',
|
||||||
|
'Default value:' : 'Výchozí hodnota:',
|
||||||
|
'Description' : 'Popis',
|
||||||
|
'Field' : 'Pole',
|
||||||
|
'General' : 'Obecné',
|
||||||
|
'Generated with' : 'Vygenerováno pomocí',
|
||||||
|
'Name' : 'Název',
|
||||||
|
'No response values.' : 'Nebyly vráceny žádné hodnoty.',
|
||||||
|
'optional' : 'volitelné',
|
||||||
|
'Parameter' : 'Parametr',
|
||||||
|
'Permission:' : 'Oprávnění:',
|
||||||
|
'Response' : 'Odpověď',
|
||||||
|
'Send' : 'Odeslat',
|
||||||
|
'Send a Sample Request' : 'Odeslat ukázkový požadavek',
|
||||||
|
'show up to version:' : 'zobrazit po verzi:',
|
||||||
|
'Size range:' : 'Rozsah velikosti:',
|
||||||
|
'Type' : 'Typ',
|
||||||
|
'url' : 'url'
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,5 +1,6 @@
|
||||||
define([
|
define([
|
||||||
'./locales/ca.js',
|
'./locales/ca.js',
|
||||||
|
'./locales/cs.js',
|
||||||
'./locales/de.js',
|
'./locales/de.js',
|
||||||
'./locales/es.js',
|
'./locales/es.js',
|
||||||
'./locales/fr.js',
|
'./locales/fr.js',
|
||||||
|
|
1
lantern-build-engine
Submodule
1
lantern-build-engine
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 7365f7d156a049d6f13987bbe55ff917e2a05254
|
322
package-lock.json
generated
322
package-lock.json
generated
|
@ -167,6 +167,117 @@
|
||||||
"normalize-path": "^2.0.0"
|
"normalize-path": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"apidoc": {
|
||||||
|
"version": "0.17.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/apidoc/-/apidoc-0.17.7.tgz",
|
||||||
|
"integrity": "sha512-9Wf4bRPwCuWOIOxR42dDnsXnFw+rhJg5VrMQK+KmNxJwyIh30UqX6gvjjXSG6YO74MqE87F18bbQXUENK9dPGg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"apidoc-core": "~0.8.2",
|
||||||
|
"commander": "^2.19.0",
|
||||||
|
"fs-extra": "^7.0.0",
|
||||||
|
"lodash": "^4.17.10",
|
||||||
|
"markdown-it": "^8.3.1",
|
||||||
|
"winston": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"commander": {
|
||||||
|
"version": "2.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
|
||||||
|
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"fs-extra": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.2",
|
||||||
|
"jsonfile": "^4.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jsonfile": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"markdown-it": {
|
||||||
|
"version": "8.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz",
|
||||||
|
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"entities": "~1.1.1",
|
||||||
|
"linkify-it": "^2.0.0",
|
||||||
|
"mdurl": "^1.0.1",
|
||||||
|
"uc.micro": "^1.0.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"apidoc-core": {
|
||||||
|
"version": "0.8.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/apidoc-core/-/apidoc-core-0.8.3.tgz",
|
||||||
|
"integrity": "sha1-2dY1RYKd8lDSzKBJaDqH53U2S5Y=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fs-extra": "^3.0.1",
|
||||||
|
"glob": "^7.1.1",
|
||||||
|
"iconv-lite": "^0.4.17",
|
||||||
|
"klaw-sync": "^2.1.0",
|
||||||
|
"lodash": "~4.17.4",
|
||||||
|
"semver": "~5.3.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fs-extra": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz",
|
||||||
|
"integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.2",
|
||||||
|
"jsonfile": "^3.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||||
|
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jsonfile": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz",
|
||||||
|
"integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
|
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"argparse": {
|
"argparse": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
@ -1066,6 +1177,63 @@
|
||||||
"object-visit": "^1.0.0"
|
"object-visit": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"color": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.1",
|
||||||
|
"color-string": "^1.5.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "1.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||||
|
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"color-string": {
|
||||||
|
"version": "1.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz",
|
||||||
|
"integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "^1.0.0",
|
||||||
|
"simple-swizzle": "^0.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"colornames": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz",
|
||||||
|
"integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"colorspace": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color": "3.0.x",
|
||||||
|
"text-hex": "1.0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"combine-source-map": {
|
"combine-source-map": {
|
||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
|
||||||
|
@ -1668,6 +1836,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"diagnostics": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"colorspace": "1.1.x",
|
||||||
|
"enabled": "1.0.x",
|
||||||
|
"kuler": "1.0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"diffie-hellman": {
|
"diffie-hellman": {
|
||||||
"version": "5.0.3",
|
"version": "5.0.3",
|
||||||
"resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
"resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
||||||
|
@ -1865,6 +2044,15 @@
|
||||||
"integrity": "sha1-nrpoN9FtCYK1n4fYib91REPVKTE=",
|
"integrity": "sha1-nrpoN9FtCYK1n4fYib91REPVKTE=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"enabled": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "http://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"env-variable": "0.0.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"end-of-stream": {
|
"end-of-stream": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
||||||
|
@ -1880,6 +2068,12 @@
|
||||||
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
|
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"env-variable": {
|
||||||
|
"version": "0.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz",
|
||||||
|
"integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"error-ex": {
|
"error-ex": {
|
||||||
"version": "1.3.2",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
||||||
|
@ -1986,6 +2180,12 @@
|
||||||
"is-extglob": "^1.0.0"
|
"is-extglob": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fast-safe-stringify": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||||
|
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"fast-url-parser": {
|
"fast-url-parser": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
|
||||||
|
@ -2004,6 +2204,12 @@
|
||||||
"websocket-driver": ">=0.5.1"
|
"websocket-driver": ">=0.5.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fecha": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "http://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"filename-regex": {
|
"filename-regex": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
||||||
|
@ -3485,6 +3691,24 @@
|
||||||
"graceful-fs": "^4.1.9"
|
"graceful-fs": "^4.1.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"klaw-sync": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-PTvNhgDnv971MjHHOf8FOu1WDkQ=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"kuler": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"colornames": "^1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"labeled-stream-splicer": {
|
"labeled-stream-splicer": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "http://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz",
|
"resolved": "http://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz",
|
||||||
|
@ -3714,6 +3938,19 @@
|
||||||
"lodash.keys": "~2.4.1"
|
"lodash.keys": "~2.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"logform": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/logform/-/logform-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"colors": "^1.2.1",
|
||||||
|
"fast-safe-stringify": "^2.0.4",
|
||||||
|
"fecha": "^2.3.3",
|
||||||
|
"ms": "^2.1.1",
|
||||||
|
"triple-beam": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"longest": {
|
"longest": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
|
||||||
|
@ -4613,6 +4850,12 @@
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"one-time": {
|
||||||
|
"version": "0.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz",
|
||||||
|
"integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"onmount": {
|
"onmount": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/onmount/-/onmount-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/onmount/-/onmount-1.3.0.tgz",
|
||||||
|
@ -6017,6 +6260,23 @@
|
||||||
"integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=",
|
"integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"simple-swizzle": {
|
||||||
|
"version": "0.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||||
|
"integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-arrayish": "^0.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"is-arrayish": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"slugify": {
|
"slugify": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "http://registry.npmjs.org/slugify/-/slugify-1.0.2.tgz",
|
"resolved": "http://registry.npmjs.org/slugify/-/slugify-1.0.2.tgz",
|
||||||
|
@ -6236,6 +6496,12 @@
|
||||||
"integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
|
"integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"stack-trace": {
|
||||||
|
"version": "0.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
|
||||||
|
"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"stat-mode": {
|
"stat-mode": {
|
||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz",
|
||||||
|
@ -6558,6 +6824,12 @@
|
||||||
"acorn-node": "^1.2.0"
|
"acorn-node": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"text-hex": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"thenify": {
|
"thenify": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
|
||||||
|
@ -6767,6 +7039,12 @@
|
||||||
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
|
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"triple-beam": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"try-require": {
|
"try-require": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/try-require/-/try-require-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/try-require/-/try-require-1.2.1.tgz",
|
||||||
|
@ -6896,6 +7174,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"universalify": {
|
||||||
|
"version": "0.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||||
|
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"unpipe": {
|
"unpipe": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
@ -7129,6 +7413,44 @@
|
||||||
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
|
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"winston": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/winston/-/winston-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"async": "^2.6.0",
|
||||||
|
"diagnostics": "^1.1.1",
|
||||||
|
"is-stream": "^1.1.0",
|
||||||
|
"logform": "^1.9.1",
|
||||||
|
"one-time": "0.0.4",
|
||||||
|
"readable-stream": "^2.3.6",
|
||||||
|
"stack-trace": "0.0.x",
|
||||||
|
"triple-beam": "^1.3.0",
|
||||||
|
"winston-transport": "^4.2.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"async": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"lodash": "^4.17.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"winston-transport": {
|
||||||
|
"version": "4.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.2.0.tgz",
|
||||||
|
"integrity": "sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"readable-stream": "^2.3.6",
|
||||||
|
"triple-beam": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"with": {
|
"with": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz",
|
||||||
|
|
20
package.json
20
package.json
|
@ -20,16 +20,16 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/sbrl/Pepperminty-Wiki#readme",
|
"homepage": "https://github.com/sbrl/Pepperminty-Wiki#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"apidoc": "^0.17.7",
|
||||||
"docpress": "^0.7.4"
|
"docpress": "^0.7.4"
|
||||||
},
|
},
|
||||||
|
"docpress": {
|
||||||
"docpress": {
|
"github": "sbrl/Pepperminty-Wiki",
|
||||||
"github": "sbrl/Pepperminty-Wiki",
|
"markdown": {
|
||||||
"markdown": {
|
"xhtmlOut": true
|
||||||
"xhtmlOut": true
|
},
|
||||||
},
|
"css": [
|
||||||
"css": [
|
"docs/theme.css"
|
||||||
"docs/theme.css"
|
]
|
||||||
]
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
BIN
phpdoc
BIN
phpdoc
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
php -S [::]:4569 -t build
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
php -S [::]:35623 -t build &
|
|
||||||
|
|
||||||
sensible-browser [::]:35623
|
|
Loading…
Reference in a new issue