From 1bc5b9f211320c3f47e7fe059837b0119f47772d Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 1 Aug 2013 20:48:27 -0700 Subject: [PATCH] html.cgi: add support for @@base(varname)@@ The @@path(varname)@@ expression is expanded to the URL path of the varname configuration variable. Add a corresponding @@base(varname)@@ that is expanded to the URL base of the varname configuration variable. --- cgi/html.cgi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cgi/html.cgi b/cgi/html.cgi index f288c14..824bae0 100755 --- a/cgi/html.cgi +++ b/cgi/html.cgi @@ -15,6 +15,7 @@ use Girocco::Util; # /^@heading=HEADING # /^@header produces HTML header based on @section and @heading # /@@gitweburl@@/ substitute for gitweburl configuration variable +# /@@base(gitweburl)@@/ substitute for base portion of gitweburl variable # /@@path(gitweburl)@@/ substitute for path portion of gitweburl variable # /@@ifmob@@...@@end@@/ remove unless mob defined # /@@ifssh@@...@@end@@/ remove unless pushurl defined @@ -61,6 +62,7 @@ foreach (split(/\n/, $template)) { print "
"; next; } else { + s/@\@base\((\w+?)\)@@/url_base(${$Girocco::Config::{$1}})/ge; s/@\@path\((\w+?)\)@@/url_path(${$Girocco::Config::{$1}})/ge; s/@@(\w+?)@@/${$Girocco::Config::{$1}}/ge; print "$_\n"; -- 2.11.4.GIT