From 709fd51d0681fe28753205d24d2fea3ccee76672 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Fri, 8 Jun 2012 21:41:25 +0200 Subject: Made Article::test_urlname public and added docu. --- ratatoeskr/sys/models.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index 5d6ee66..95a500f 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -2336,7 +2336,17 @@ class Article extends BySQLRowEnabled */ public function get_id() { return $this->id; } - private static function test_urlname($urlname) + /* + * Function: test_urlname + * Test, if a urlname is a valid urlname. + * + * Parameters: + * $urlname - Urlname to test + * + * Returns: + * True, if the urlname is valid, False otherwise. + */ + public static function test_urlname($urlname) { return (bool) preg_match('/^[a-zA-Z0-9-_]+$/', $urlname); } -- cgit v1.2.3-70-g09d2