summaryrefslogtreecommitdiff
path: root/lib/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common.php')
-rw-r--r--lib/common.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/common.php b/lib/common.php
index cd4fbfb15..cf4d6e1e7 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -117,6 +117,17 @@ require_once 'markdown.php';
// XXX: other formats here
+/**
+ * Avoid the NICKNAME_FMT constant; use the Nickname class instead.
+ *
+ * Nickname::DISPLAY_FMT is more suitable for inserting into regexes;
+ * note that it includes the [] and repeating bits, so should be wrapped
+ * directly in a capture paren usually.
+ *
+ * For validation, use Nickname::normalize(), Nickname::isValid() etc.
+ *
+ * @deprecated
+ */
define('NICKNAME_FMT', VALIDATE_NUM.VALIDATE_ALPHA_LOWER);
require_once INSTALLDIR.'/lib/util.php';