]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
file and avatar dirs on instances with no such dirs in filesystem
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 12 Feb 2016 01:29:33 +0000 (02:29 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 12 Feb 2016 01:29:33 +0000 (02:29 +0100)
lib/nickname.php

index c49ce20f5eff28ae0e5bb4d1534c55cf37764190..2dd08efc3f7baeee1de2245453d3c915cde23f8b 100644 (file)
@@ -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));
     }