Browse Source

Comment feature-search with phpDoc & update docs

master
Starbeamrainbowlabs 3 years ago
parent
commit
f9ad937a21
58 changed files with 1627 additions and 838 deletions
  1. +5
    -5
      docs/ModuleApi/classes/PeppermintParsedown.html
  2. +5
    -5
      docs/ModuleApi/classes/Slimdown.html
  3. +5
    -5
      docs/ModuleApi/classes/ids.html
  4. +5
    -5
      docs/ModuleApi/classes/page_renderer.html
  5. +116
    -88
      docs/ModuleApi/classes/search.html
  6. +54
    -5
      docs/ModuleApi/files/core.html
  7. +30
    -1
      docs/ModuleApi/files/core.php.txt
  8. +5
    -5
      docs/ModuleApi/files/download.html
  9. +5
    -5
      docs/ModuleApi/files/modules.action-hash.html
  10. +5
    -5
      docs/ModuleApi/files/modules.action-protect.html
  11. +5
    -5
      docs/ModuleApi/files/modules.action-random.html
  12. +5
    -5
      docs/ModuleApi/files/modules.action-raw.html
  13. +5
    -5
      docs/ModuleApi/files/modules.api-status.html
  14. +5
    -5
      docs/ModuleApi/files/modules.extra-sidebar.html
  15. +56
    -5
      docs/ModuleApi/files/modules.feature-comments.html
  16. +5
    -5
      docs/ModuleApi/files/modules.feature-guiconfig.html
  17. +5
    -5
      docs/ModuleApi/files/modules.feature-history.html
  18. +5
    -5
      docs/ModuleApi/files/modules.feature-recent-changes.html
  19. +5
    -5
      docs/ModuleApi/files/modules.feature-redirect.html
  20. +6
    -6
      docs/ModuleApi/files/modules.feature-search.html
  21. +5
    -5
      docs/ModuleApi/files/modules.feature-stats.html
  22. +5
    -5
      docs/ModuleApi/files/modules.feature-upload.html
  23. +5
    -5
      docs/ModuleApi/files/modules.feature-user-preferences.html
  24. +5
    -5
      docs/ModuleApi/files/modules.page-credits.html
  25. +5
    -5
      docs/ModuleApi/files/modules.page-debug-info.html
  26. +5
    -5
      docs/ModuleApi/files/modules.page-delete.html
  27. +5
    -5
      docs/ModuleApi/files/modules.page-edit.html
  28. +5
    -5
      docs/ModuleApi/files/modules.page-export.html
  29. +5
    -5
      docs/ModuleApi/files/modules.page-help.html
  30. +5
    -5
      docs/ModuleApi/files/modules.page-list.html
  31. +5
    -5
      docs/ModuleApi/files/modules.page-login.html
  32. +5
    -5
      docs/ModuleApi/files/modules.page-logout.html
  33. +5
    -5
      docs/ModuleApi/files/modules.page-move.html
  34. +5
    -5
      docs/ModuleApi/files/modules.page-update.html
  35. +5
    -5
      docs/ModuleApi/files/modules.page-user-list.html
  36. +5
    -5
      docs/ModuleApi/files/modules.page-view.html
  37. +5
    -5
      docs/ModuleApi/files/modules.parser-default-old.html
  38. +5
    -5
      docs/ModuleApi/files/modules.parser-parsedown.html
  39. +8
    -1
      docs/ModuleApi/files/modules/action-random.php.txt
  40. +101
    -2
      docs/ModuleApi/files/modules/feature-comments.php.txt
  41. +77
    -21
      docs/ModuleApi/files/modules/feature-search.php.txt
  42. +8
    -2
      docs/ModuleApi/files/modules/page-edit.php.txt
  43. +1
    -0
      docs/ModuleApi/files/modules/parser-parsedown.php.txt
  44. +5
    -5
      docs/ModuleApi/files/pack.html
  45. +5
    -5
      docs/ModuleApi/files/settings.fragment.html
  46. +6
    -0
      docs/ModuleApi/files/settings.fragment.php.txt
  47. +3
    -3
      docs/ModuleApi/graphs/class.html
  48. +52
    -0
      docs/ModuleApi/graphs/classes.svg
  49. +106
    -6
      docs/ModuleApi/index.html
  50. +106
    -6
      docs/ModuleApi/namespaces/default.html
  51. +3
    -3
      docs/ModuleApi/reports/deprecated.html
  52. +6
    -196
      docs/ModuleApi/reports/errors.html
  53. +30
    -7
      docs/ModuleApi/reports/markers.html
  54. +302
    -144
      docs/RestApi/api_data.js
  55. +302
    -144
      docs/RestApi/api_data.json
  56. +1
    -1
      docs/RestApi/api_project.js
  57. +1
    -1
      docs/RestApi/api_project.json
  58. +77
    -21
      modules/feature-search.php

+ 5
- 5
docs/ModuleApi/classes/PeppermintParsedown.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-384877966"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1153864255"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-384877966" class="accordion-body collapse in">
<div id="namespace-1153864255" class="accordion-body collapse in">
<div class="accordion-inner">
@ -365,7 +365,7 @@ with a URL encoded version of the page name.</em></p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/classes/Slimdown.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-127662780"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-820328139"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-127662780" class="accordion-body collapse in">
<div id="namespace-820328139" class="accordion-body collapse in">
<div class="accordion-inner">
@ -414,7 +414,7 @@ Added image support</p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/classes/ids.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-2024061740"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-167413318"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2024061740" class="accordion-body collapse in">
<div id="namespace-167413318" class="accordion-body collapse in">
<div class="accordion-inner">
@ -525,7 +525,7 @@ index.</p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/classes/page_renderer.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-874059852"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1633737080"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-874059852" class="accordion-body collapse in">
<div id="namespace-1633737080" class="accordion-body collapse in">
<div class="accordion-inner">
@ -943,7 +943,7 @@ navigation bar.</p></td>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 116
- 88
docs/ModuleApi/classes/search.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-1930599762"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1506521234"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1930599762" class="accordion-body collapse in">
<div id="namespace-1506521234" class="accordion-body collapse in">
<div class="accordion-inner">
@ -167,7 +167,7 @@
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>\</small>search</h1>
<p><em></em></p>
<p><em>Holds a collection to methods to manipulate various types of search index.</em></p>
@ -272,7 +272,7 @@
<article class="property">
<h3 class="public ">$stop_words</h3>
<pre class="signature">$stop_words : </pre>
<p><em></em></p>
<p><em>Words that we should exclude from the inverted index</em></p>
<h4>Type</h4>
@ -303,21 +303,25 @@
<article class="method">
<h3 class="public ">index()</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;">index( <span class="argument">$source</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">index(string <span class="argument">$source</span>) : array</pre>
<p><em>Converts a source string into an index of search terms that can be
merged into an inverted index.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$source </td>
<td></td>
<td><p>The source string to index.</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>An index represents the specified string.</p>
</article>
</div>
<aside class="span4 detailsbar">
@ -338,21 +342,24 @@
<article class="method">
<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>
<pre class="signature" style="margin-right: 54px;">tokenize( <span class="argument">$source</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">tokenize(string <span class="argument">$source</span>) : array</pre>
<p><em>Converts a source string into a series of raw tokens.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$source </td>
<td></td>
<td><p>The source string to process.</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>An array of raw tokens extracted from the specified source string.</p>
</article>
</div>
<aside class="span4 detailsbar">
@ -373,21 +380,24 @@
<article class="method">
<h3 class="public ">strip_markup()</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;">strip_markup( <span class="argument">$source</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">strip_markup(string <span class="argument">$source</span>) : string</pre>
<p><em>Removes (most) markdown markup from the specified string.</em></p>
<p>Stripped strings are not suitable for indexing!</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$source </td>
<td></td>
<td><p>The source string to process.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The stripped string.</p>
</article>
</div>
<aside class="span4 detailsbar">
@ -408,16 +418,16 @@
<article class="method">
<h3 class="public ">rebuild_invindex()</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;">rebuild_invindex( <span class="argument">$output = true</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">rebuild_invindex(boolean <span class="argument">$output = true</span>) </pre>
<p><em>Rebuilds the master inverted index and clears the page id index.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>boolean</td>
<td>$output </td>
<td></td>
<td><p>Whether to send progress information to the user's browser.</p></td>
</tr>
</table>
@ -443,16 +453,17 @@
<article class="method">
<h3 class="public ">sort_index()</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;">sort_index( <span class="argument">$index</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">sort_index(array <span class="argument">$index</span>) </pre>
<p><em>Sorts an index alphabetically. Will also sort an inverted index.</em></p>
<p>This allows us to do a binary search instead of a regular
sequential search.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>array</td>
<td>$index </td>
<td></td>
<td><p>The index to sort.</p></td>
</tr>
</table>
@ -478,31 +489,31 @@
<article class="method">
<h3 class="public ">compare_indexes()</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;">compare_indexes( <span class="argument">$oldindex</span>, <span class="argument">$newindex</span>, <span class="argument">$changed</span>, <span class="argument">$removed</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">compare_indexes(array <span class="argument">$oldindex</span>, array <span class="argument">$newindex</span>, array <span class="argument">$changed</span>, array <span class="argument">$removed</span>) </pre>
<p><em>Compares two *regular* indexes to find the differences between them.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>array</td>
<td>$oldindex </td>
<td></td>
<td><p>The old index.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$newindex </td>
<td></td>
<td><p>The new index.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$changed </td>
<td></td>
<td><p>An array to be filled with the nterms of all the changed entries.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$removed </td>
<td></td>
<td><p>An array to be filled with the nterms of all the removed entries.</p></td>
</tr>
</table>
@ -528,16 +539,16 @@
<article class="method">
<h3 class="public ">load_invindex()</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;">load_invindex( <span class="argument">$invindex_filename</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">load_invindex(string <span class="argument">$invindex_filename</span>) </pre>
<p><em>Reads in and parses an inverted index.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$invindex_filename </td>
<td></td>
<td><p>The path tp the inverted index to parse.</p></td>
</tr>
</table>
@ -552,7 +563,14 @@
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
<tr>
<th>
todo
</th>
<td>
<p>Remove this function and make everything streamable</p>
</td>
</tr>
</table>
</aside>
</div>
@ -563,16 +581,16 @@
<article class="method">
<h3 class="public ">measure_invindex_load_time()</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;">measure_invindex_load_time( <span class="argument">$invindex_filename</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">measure_invindex_load_time(string <span class="argument">$invindex_filename</span>) </pre>
<p><em>Reads in and parses an inverted index, measuring the time it takes to do so.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$invindex_filename </td>
<td></td>
<td><p>The path to the file inverted index to parse.</p></td>
</tr>
</table>
@ -598,31 +616,31 @@
<article class="method">
<h3 class="public ">merge_into_invindex()</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;">merge_into_invindex( <span class="argument">$invindex</span>, <span class="argument">$pageid</span>, <span class="argument">$index</span>, <span class="argument">$removals = array()</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">merge_into_invindex(array <span class="argument">$invindex</span>, integer <span class="argument">$pageid</span>, array <span class="argument">$index</span>, array <span class="argument">$removals = array()</span>) </pre>
<p><em>Merge an index into an inverted index.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>array</td>
<td>$invindex </td>
<td></td>
<td><p>The inverted index to merge into.</p></td>
</tr>
<tr>
<td></td>
<td>integer</td>
<td>$pageid </td>
<td></td>
<td><p>The id of the page to assign to the index that's being merged.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$index </td>
<td></td>
<td><p>The regular index to merge.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$removals </td>
<td></td>
<td><p>An array of index entries to remove from the inverted index. Useful for applying changes to an inverted index instead of deleting and remerging an entire page's index.</p></td>
</tr>
</table>
@ -688,21 +706,21 @@
<article class="method">
<h3 class="public ">save_invindex()</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_invindex( <span class="argument">$filename</span>, <span class="argument">$invindex</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">save_invindex(string <span class="argument">$filename</span>, array <span class="argument">$invindex</span>) </pre>
<p><em>Saves the given inverted index back to disk.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$filename </td>
<td></td>
<td><p>The path to the file to save the inverted index to.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$invindex </td>
<td></td>
<td><p>The inverted index to save.</p></td>
</tr>
</table>
@ -728,26 +746,29 @@
<article class="method">
<h3 class="public ">query_invindex()</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;">query_invindex( <span class="argument">$query</span>, <span class="argument">$invindex</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">query_invindex(string <span class="argument">$query</span>, array <span class="argument">$invindex</span>) : array</pre>
<p><em>Searches the given inverted index for the specified search terms.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$query </td>
<td></td>
<td><p>The search query.</p></td>
</tr>
<tr>
<td></td>
<td>array</td>
<td>$invindex </td>
<td></td>
<td><p>The inverted index to search.</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>An array of matching pages.</p>
</article>
</div>
<aside class="span4 detailsbar">
@ -768,26 +789,30 @@
<article class="method">
<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>
<pre class="signature" style="margin-right: 54px;">extract_context( <span class="argument">$query</span>, <span class="argument">$source</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">extract_context(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
in a list of search results.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$query </td>
<td></td>
<td><p>The search queary to generate the context for.</p></td>
</tr>
<tr>
<td></td>
<td>string</td>
<td>$source </td>
<td></td>
<td><p>The page source to extract the context from.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The generated context string.</p>
</article>
</div>
<aside class="span4 detailsbar">
@ -808,26 +833,29 @@
<article class="method">
<h3 class="public ">highlight_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>
<pre class="signature" style="margin-right: 54px;">highlight_context( <span class="argument">$query</span>, <span class="argument">$context</span>) </pre>
<p><em></em></p>
<pre class="signature" style="margin-right: 54px;">highlight_context(string <span class="argument">$query</span>, string <span class="argument">$context</span>) : string</pre>
<p><em>Highlights the keywords of a context string.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>string</td>
<td>$query </td>
<td></td>
<td><p>The query to use when highlighting.</p></td>
</tr>
<tr>
<td></td>
<td>string</td>
<td>$context </td>
<td></td>
<td><p>The context string to highlight.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The highlighted (HTML) string.</p>
</article>
</div>
<aside class="span4 detailsbar">
@ -891,7 +919,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 54
- 5
docs/ModuleApi/files/core.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-1166434112"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-221792160"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1166434112" class="accordion-body collapse in">
<div id="namespace-221792160" class="accordion-body collapse in">
<div class="accordion-inner">
@ -1915,6 +1915,55 @@ don&#039;t have it.</em></p>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_register_remote_file" name="method_register_remote_file" class="anchor"></a>
<article class="method">
<h3 class=" ">register_remote_file()</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;">register_remote_file(array <span class="argument">$remote_file_def</span>) </pre>
<p><em>Registers a request for a remote file to be downloaded before execution. Will block until all files are downloaded.</em></p>
<p>Example definition:
[ &quot;local_filename&quot; =&gt; &quot;file.ext&quot;, &quot;remote_url&quot;: &quot;<a href="https://example.com">https://example.com</a>&quot; ]</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$remote_file_def </td>
<td><p>The remote file definition to register.</p></td>
</tr>
</table>
<h4>Throws</h4>
<dl>
<dt>\Exception</dt>
<dd><p>Exception Throws an exception if a definition for the requested local file already exists.</p></dd>
</dl>
</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_register_module" name="method_register_module" class="anchor"></a>
<article class="method">
<h3 class=" ">register_module()</h3>
@ -2438,7 +2487,7 @@ an edit is saved.</em></p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 30
- 1
docs/ModuleApi/files/core.php.txt View File

@ -1583,6 +1583,25 @@ if($settings->require_login_view === true && // If this site requires a login in
//////////////////////////////////////
//////////////////////////////////////
$remote_files = [];
/**
* Registers a request for a remote file to be downloaded before execution. Will block until all files are downloaded.
* Example definition:
* [ "local_filename" => "file.ext", "remote_url": "https://example.com" ]
* @param array $remote_file_def The remote file definition to register.
* @throws Exception Exception Throws an exception if a definition for the requested local file already exists.
*/
function register_remote_file($remote_file_def) {
global $remote_files;
foreach($remote_files as $ex_remote_file_def) {
if($ex_remote_file_def["local_filename"] == $remote_file_def["local_filename"])
throw new Exception("Error: A remote file with the local filename '{$remote_file_def["local_filename"]}' is already registered.");
}
$remote_files[] = $remote_file_def;
}
//////////////////////////
/// Module functions ///
//////////////////////////
@ -1591,7 +1610,7 @@ if($settings->require_login_view === true && // If this site requires a login in
// register themselves //
// or new pages. //
//////////////////////////
/** A list of all the currentlyloaded modules. Not guaranteed to be populated until an action is executed. */
/** A list of all the currently loaded modules. Not guaranteed to be populated until an action is executed. */
$modules = [];
/**
* Registers a module.
@ -1763,6 +1782,16 @@ if(!isset($actions->credits))
exit(page_renderer::render_main("Error - $settings->$sitename", "<p>No credits page detected. The credits page is a required module!</p>"));
}
// Download all the requested remote files
ini_set("user_agent", "$settings->sitename (Pepperminty-Wiki-Downloader; PHP/" . phpversion() . "; +https://github.com/sbrl/Pepperminty-Wiki/) Pepperminty-Wiki/$version");
foreach($remote_files as $remote_file_def) {
if(file_exists($remote_file_def["local_filename"]) && filesize($remote_file_def["local_filename"]) > 0)
continue;
error_log("[ Pepperminty-Wiki/$settings->sitename ] Downloading {$remote_file_def["local_filename"]} from {$remote_file_def["remote_url"]}");
file_put_contents($remote_file_def["local_filename"], fopen($remote_file_def["remote_url"], "rb"));
}
// Perform the appropriate action
$action_name = $env->action;
if(isset($actions->$action_name))


+ 5
- 5
docs/ModuleApi/files/download.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-1570989444"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-579197492"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1570989444" class="accordion-body collapse in">
<div id="namespace-579197492" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/files/modules.action-hash.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-1332662049"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2096227298"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1332662049" class="accordion-body collapse in">
<div id="namespace-2096227298" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/files/modules.action-protect.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-2122323479"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1139473875"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2122323479" class="accordion-body collapse in">
<div id="namespace-1139473875" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/files/modules.action-random.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-1010967540"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-330489182"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1010967540" class="accordion-body collapse in">
<div id="namespace-330489182" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/files/modules.action-raw.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-1568650655"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1658446726"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1568650655" class="accordion-body collapse in">
<div id="namespace-1658446726" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/files/modules.api-status.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-601692093"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1857578391"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-601692093" class="accordion-body collapse in">
<div id="namespace-1857578391" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on October 25th, 2017 at 21:45.
on November 20th, 2017 at 20:40.
</section>
</section>
</section>


+ 5
- 5
docs/ModuleApi/files/modules.extra-sidebar.html View File

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">82</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">7</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<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-371666784"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2077238817"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-371666784" class="accordion-body collapse in">