From: Mikael Nordfeldth Date: Fri, 12 Feb 2016 01:29:33 +0000 (+0100) Subject: file and avatar dirs on instances with no such dirs in filesystem X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f10625f8bc59e3ae52da07fdba910329fad540a3;p=quix0rs-gnu-social.git file and avatar dirs on instances with no such dirs in filesystem --- diff --git a/lib/nickname.php b/lib/nickname.php index c49ce20f5e..2dd08efc3f 100644 --- a/lib/nickname.php +++ b/lib/nickname.php @@ -191,6 +191,12 @@ class Nickname $paths[$matches[1]] = true; } } + + // FIXME: this assumes the 'path' is in the first-level directory, though common it's not certain + foreach (['avatar', 'attachments'] as $cat) { + $paths[basename(common_config($cat, 'path'))] = true; + } + return in_array($str, array_keys($paths)); }