Compare commits

...

6 Commits

Author SHA1 Message Date
Ben Spiegel 1d94c2d291
Merge 3abad2e61e into 951a08dde8 2024-02-07 11:20:30 -07:00
Starbeamrainbowlabs 951a08dde8
fixup 2024-02-07 00:39:24 +00:00
Starbeamrainbowlabs 8236263aef
CONTRIBUTING: Tweak guidance
Don't ever feel like you're wasting my time! I'll tell you if this is the case :P
2024-02-06 23:22:17 +00:00
Starbeamrainbowlabs d44ceaa412
Add contributing guide 2024-02-01 23:47:06 +00:00
Benjamin Spiegel 3abad2e61e Replace deprecated reset(object)
Calling `reset()` on an object causes warnings starting in PHP 8.2.
This commit replaces one instance with ArrayIterator object and
getIterator() method following a recommendation in the deprecation
notice RFC.
2023-06-05 21:48:14 -05:00
Benjamin Spiegel 484f71fc6c Replace deprecated ${var} in strings with {$var}
Using `${var}` to embed variables in strings causes warnings starting
in PHP 8.2. This commit replaces two instances with `{$var}`, following
recommendations in the deprecation notice and related RFC.
2023-05-22 00:34:20 -05:00
4 changed files with 24 additions and 4 deletions

17
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,17 @@
# Contributors guide
Contributions are very welcome - both issues and pull requests! Please mention in your pull request that you release your work under the MPL-2.0 (see below).
While Pepperminty Wiki is a huge long-time passion of mine, at times it may take up to 2 weeks at times for me to respond to issues and pull requests. If it has been a few days and you have not received a reply, consider joining [the Gitter/Matrix chat](https://app.gitter.im/#/room/#Pepperminty-Wiki_Lobby:gitter.im) and poking me on there.
I recommend checking on your pull request or issue every few days for a reply.
If you open a pull request, I will review your changes and reply with a review detailing some changes I would like you to make. It may take a few back and forth comments, but then once I am happy with your changes I'll accept them and merge them into the codebase. This way we can polish your contribution to make it fit in with the existing codebase better ✨
It is also unlikely, but possible I may reject your changes. If this is the case, I will leave a comment explaining why.
If you are no longer interested in continuing to work with a pull request or will be away for a while, please leave a comment. Nobody will be offended! If you do not leave a comment or do not respond for 2 weeks, I may take over your pull request, work on it, and merge it myself.
## Useful Links
- **Documentation:** <https://starbeamrainbowlabs.com/labs/peppermint/__nightdocs/01-Welcome.html>
- **HTTP API Docs:** <https://starbeamrainbowlabs.com/labs/peppermint/docs/RestApi/>
- **PHP API Docs:** <https://starbeamrainbowlabs.com/labs/peppermint/docs/ModuleApi/>

View File

@ -76,6 +76,8 @@ If you would like to encrypt any communications with me, you can find my GPG key
## Contributing
Contributions are very welcome - both issues and pull requests! Please mention in your pull request that you release your work under the MPL-2.0 (see below).
See [CONTRIBUTING.md](./CONTRIBUTING.md) for a guide on what to expect when submitting a pull request or issue to this project.
If you're feeling that way inclined, the sponsor button at the top of the page (if you're on GitHub) will take you to my [Liberapay profile](https://liberapay.com/sbrl) if you'd like to donate to say an extra thank you :-)

View File

@ -831,8 +831,9 @@ class search
continue; // Skip terms we shouldn't search the page body for
// Loop over the pageindex and search the titles / tags
reset($pageindex); // Reset array/object pointer
foreach($pageindex as $pagename => $pagedata) {
$obj = new ArrayObject($pageindex);
$it = $obj->getIterator();
foreach($it as $pagename => $pagedata) {
// Setup a variable to hold the current page's id
$pageid = null; // Cache the page id

View File

@ -1101,9 +1101,9 @@ class PeppermintParsedown extends ParsedownExtra
// The page name is made safe when Pepperminty Wiki does initial consistency checks (if it's unsafe it results in a 301 redirect)
$page_name = parsedown_pagename_resolve($matches_url[1]);
$internal_link_text = "[[${page_name}]]";
$internal_link_text = "[[{$page_name}]]";
if(!empty($matches[1])) // If the display text isn't empty, then respect it
$internal_link_text = "[[${page_name}¦{$matches[1]}]]";
$internal_link_text = "[[{$page_name}¦{$matches[1]}]]";
$result = $this->inlineInternalLink([
"text" => $internal_link_text