X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=3108e57cf25cfd999d9f0ecd3a04bb99f3e3b81e;hb=c0be733d6d5318f333514430a5b1ad11821d2f3d;hp=d3310ba1aad256026e07f9b6b3f47a32d8dce15a;hpb=f173322539fe17eb151550db6f16b0f271e80f2d;p=friendica.git diff --git a/index.php b/index.php index d3310ba1aa..3108e57cf2 100644 --- a/index.php +++ b/index.php @@ -417,24 +417,8 @@ if (stristr( implode("",$_SESSION['sysmsg']), t('Permission denied'))) { * */ -/*if (x($_SESSION,'sysmsg')) { - $a->page['content'] = "
{$_SESSION['sysmsg']}
\r\n" - . ((x($a->page,'content')) ? $a->page['content'] : ''); - $_SESSION['sysmsg']=""; - unset($_SESSION['sysmsg']); -} -if (x($_SESSION,'sysmsg_info')) { - $a->page['content'] = "
{$_SESSION['sysmsg_info']}
\r\n" - . ((x($a->page,'content')) ? $a->page['content'] : ''); - $_SESSION['sysmsg_info']=""; - unset($_SESSION['sysmsg_info']); -}*/ - - - call_hooks('page_end', $a->page['content']); - /** * * Add the navigation (menu) template @@ -489,7 +473,6 @@ if (isset($_GET["mode"]) AND (($_GET["mode"] == "raw") OR ($_GET["mode"] == "min $list = $xpath->query("//*[contains(@id,'tread-wrapper-')]"); /* */ foreach ($list as $item) { - $item = $target->importNode($item, true); // And then append it to the target @@ -513,14 +496,14 @@ if (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")) { $page = $a->page; $profile = $a->profile; -header("X-Friendica-Version: ".FRIENDICA_VERSION); +header("X-Friendica-Version: " . FRIENDICA_VERSION); header("Content-type: text/html; charset=utf-8"); // We use $_GET["mode"] for special page templates. So we will check if we have // to load another page template than the default one // The page templates are located in /view/php/ or in the theme directory if (isset($_GET["mode"])) { - $template = theme_include($_GET["mode"].'.php'); + $template = theme_include($_GET["mode"] . '.php'); } // If there is no page template use the default page template @@ -528,8 +511,10 @@ if (!$template) { $template = theme_include("default.php"); } -require_once($template); +/// @TODO Looks unsafe (remote-inclusion), is maybe not but theme_include() uses file_exists() but does not escape anything +require_once $template; -if (!$a->is_backend()) +if (!$a->is_backend()) { session_write_close(); -exit; +} +exit();