summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-09-24 18:18:26 -0700
committerZach Copley <zach@status.net>2009-09-24 18:18:26 -0700
commit150cf8c045e8e091a70440d1b833fa19aaf31419 (patch)
tree26aa6f09e89cf1176785f6bcb9b38b4c61d4a7cd /classes/User.php
parented9ba9d945e4f50812022a7489fc8135f4e49846 (diff)
parentb617c608ea0d66451eb2dcd75e1e1c58c179d8e6 (diff)
Merge branch '0.9.x' into refactor-api
* 0.9.x: (88 commits) Left a couple debugging statements in (removed) Output If-Modified-Since header for all RSS 1.0 feeds (again) Revert "move scripts to just before </body>, add event for scripts that need to be in <head>" Implemented join and leave groups api methods implemented etag and last modified Fixed broken Piwik plugin - was not using the supplied site code move scripts to just before </body>, add event for scripts that need to be in <head> some UI fixes Using timeline string instead of title for WindowName because IE doesn't Added JavaScript to initialize the poped Window Some layout and rendering adjustment for Realtime plugin Created addPop() for Realtime plugin and added param to include iconurl move some stuff around for realtime hack around address hack in util.js Add some more realtime feeds Do realtime popup with PHP instead of Javascript JavaScript fixes for IE Revert "Added realtime streams for all and showstream timelines" Revert "Fixed indenting" Revert "Made it slighly more compact with less jQuery selection" ...
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/classes/User.php b/classes/User.php
index 11cb4f08b..5e74c7fde 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -117,11 +117,15 @@ class User extends Memcached_DataObject
function allowed_nickname($nickname)
{
// XXX: should already be validated for size, content, etc.
- static $blacklist = array('rss', 'xrds', 'doc', 'main',
- 'settings', 'notice', 'user',
- 'search', 'avatar', 'tag', 'tags',
- 'api', 'message', 'group', 'groups',
- 'local');
+
+ $blacklist = array();
+
+ //all directory and file names should be blacklisted
+ $d = dir(INSTALLDIR);
+ while (false !== ($entry = $d->read())) {
+ $blacklist[]=$entry;
+ }
+ $d->close();
$merged = array_merge($blacklist, common_config('nickname', 'blacklist'));
return !in_array($nickname, $merged);
}