Fixed #498: inexistent namespace correctly handled.
This commit is contained in:
parent
0ac4be8bb0
commit
c7a05066d3
2 changed files with 8 additions and 3 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.2.505")]
|
[assembly: AssemblyVersion("3.0.2.506")]
|
||||||
[assembly: AssemblyFileVersion("3.0.2.505")]
|
[assembly: AssemblyFileVersion("3.0.2.506")]
|
||||||
|
|
|
@ -41,7 +41,12 @@ namespace ScrewTurn.Wiki {
|
||||||
|
|
||||||
// Extract the current namespace, if any
|
// Extract the current namespace, if any
|
||||||
string nspace = GetCurrentNamespace() + "";
|
string nspace = GetCurrentNamespace() + "";
|
||||||
if(!string.IsNullOrEmpty(nspace)) pageName = pageName.Substring(nspace.Length + 1); // Trim Namespace. from pageName
|
if(!string.IsNullOrEmpty(nspace)) {
|
||||||
|
// Verify that namespace exists
|
||||||
|
if(Pages.FindNamespace(nspace) == null) HttpContext.Current.Response.Redirect("~/PageNotFound.aspx?Page=" + pageName);
|
||||||
|
}
|
||||||
|
// Trim Namespace. from pageName
|
||||||
|
if(!string.IsNullOrEmpty(nspace)) pageName = pageName.Substring(nspace.Length + 1);
|
||||||
|
|
||||||
string queryString = ""; // Empty or begins with ampersand, not question mark
|
string queryString = ""; // Empty or begins with ampersand, not question mark
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue