Subversion Repositories Applications.wikini

Rev

Rev 45 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 45 Rev 54
Line 1719... Line 1719...
1719
unset($CookiePath);
1719
unset($CookiePath);
Line 1720... Line 1720...
1720
 
1720
 
1721
// start session
1721
// start session
Line 1722... Line -...
1722
session_start();
-
 
1723
 
-
 
1724
// fetch wakka location
-
 
1725
if (empty($_REQUEST['wiki']))
-
 
1726
{
-
 
1727
	// redirect to the root page
-
 
1728
	header('Location: ' . $wakkaConfig['base_url'] . $wakkaConfig['root_page']);
-
 
1729
	exit;
-
 
1730
}
-
 
1731
$wiki = $_REQUEST['wiki'];
-
 
1732
 
-
 
1733
// remove leading slash
-
 
1734
$wiki = preg_replace("/^\//", "", $wiki);
-
 
1735
 
-
 
1736
// split into page/method, checking wiki name & method name (XSS proof)
-
 
1737
if (preg_match('`^' . WN_TAG_HANDLER_CAPTURE . '$`', $wiki, $matches))
-
 
1738
{
-
 
1739
	list(, $page, $method) = $matches;
-
 
1740
}
-
 
1741
elseif (preg_match('`^' . WN_PAGE_TAG . '$`', $wiki))
-
 
1742
{
-
 
1743
	$page = $wiki;
-
 
1744
}
-
 
1745
else
-
 
1746
{
-
 
1747
	echo "<p>Le nom de la page est incorrect.</p>";
-
 
1748
	exit;
-
 
1749
}
1722
session_start();
1750
 
1723
 
1751
// create wiki object
1724
// create wiki object
1752
$wiki = new Wiki($wakkaConfig);
1725
$wiki = new Wiki($wakkaConfig);
1753
// check for database access
1726
// check for database access