]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
docfiles can take arguments
authorEvan Prodromou <evan@status.net>
Mon, 18 Apr 2011 13:03:43 +0000 (09:03 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 18 Apr 2011 13:03:43 +0000 (09:03 -0400)
lib/util.php

index 086372a7801f3d4f629feb31c2abf3e718328982..05c5407cdb5b6db216254e8416f875b62ed2be62 100644 (file)
@@ -1931,8 +1931,9 @@ function common_confirmation_code($bits)
 
 // convert markup to HTML
 
-function common_markup_to_html($c)
+function common_markup_to_html($c, $args=null)
 {
+    $c = preg_replace('/%%arg.(\w+)%%/', "{$args['\\1']}", $c);
     $c = preg_replace('/%%user.(\w+)%%/e', "common_user_property('\\1')", $c);
     $c = preg_replace('/%%action.(\w+)%%/e', "common_local_url('\\1')", $c);
     $c = preg_replace('/%%doc.(\w+)%%/e', "common_local_url('doc', array('title'=>'\\1'))", $c);