-
Notifications
You must be signed in to change notification settings - Fork 0
/
MojoPortalUrlBuilder.cs
34 lines (29 loc) · 1.13 KB
/
MojoPortalUrlBuilder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Web;
using yaf;
namespace yaf
{
public class MojoPortalUrlBuilder : IUrlBuilder
{
public string BuildUrl(string url)
{
string pageURL = "/forumyaf.aspx";
string currentPath=null;
string serverPath=HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"];
string tabID = HttpContext.Current.Request.QueryString["tabid"];
if (serverPath.Contains(Config.Root))
currentPath = serverPath;
else
currentPath = Config.Root + serverPath;
//currentPath = pageURL;
//serverPath - string str = string.Concat("/Modules/yaf",HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"]);
//tabID string str2 = HttpContext.Current.Request.QueryString["tabid"];
//str = "/Modules/yaf/";
if (tabID != null)
{
return string.Format("{0}?tabid={1}&{2}", currentPath, tabID, url);
}
return string.Format("{0}?{1}", currentPath, url);
}
}
}