Don't add author to autocomplete IF the template is from the author's repository

pull/11/head
Squidly271 2021-04-22 15:06:09 -04:00
parent 72981221d9
commit b28e6b29f5
3 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,7 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
6e48a62b91bdd066f023f46c6b491afd ./images/discord-gray.svg
8e7dc33512b8a78f28d7179a972c7c34 ./images/discord-hover.svg
54e46db492ddb033dfeb2827c5efd4a8 ./images/discord-white.svg
aea7810b6262b624eac33dd7dcb5c965 ./include/exec.php
9c186878dde3a06d4a3e9f8f5769b553 ./include/exec.php
46a523633a4737378b64192db97fca27 ./include/helpers.php
8f1129e0cdb994c6d1900192252433d8 ./include/paths.php
9ba7ea3ef8bad60cb8335da9c0daea4f ./javascript/libraries.js

View File

@ -1448,8 +1448,10 @@ function populateAutoComplete() {
if ( startsWith($autoComplete[$name],"activ ") )
$autoComplete[$name] = str_replace("activ ","",$autoComplete[$name]);
$autoComplete[strtolower($template['Author'])] = $template['Author'];
if ( ! $autoComplete[strtolower($template['Author'])."'s Repository"] && ! $autoComplete[strtolower($template['Author']."' Repository")]) {
$autoComplete[strtolower($template['Author'])] = $template['Author'];
}
if ( $template['ExtraSearchTerms'] ) {
foreach (explode(" ",$template['ExtraSearchTerms']) as $searchTerm) {
$searchTerm = str_replace("%20"," ",$searchTerm);