]> git.mxchange.org Git - friendica.git/blobdiff - index.php
post branch fixes
[friendica.git] / index.php
index a30c69d37d21f6d0796950993bad9796dbdbe4d5..2353355f0cb0717c16eafd2c181d934bcbd89ede 100644 (file)
--- a/index.php
+++ b/index.php
@@ -36,6 +36,7 @@ if(strlen($a->module)) {
                $a->module_loaded = true;
        }
        else {
+               header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
                notice( t('Page not found' ) . EOL);
        }
 }
@@ -43,8 +44,8 @@ if(strlen($a->module)) {
 // invoke module functions
 // Important: Modules normally do not emit content, unless you need it for debugging.
 // The module_init, module_post, and module_afterpost functions process URL parameters and POST processing.
-// The module_content function returns content text to this function where it is included on the page.
-// Modules emitting XML/Atom, etc. should do so in the _init function and promptly exit.
+// The module_content function returns content text to this file where it is included on the page.
+// Modules emitting XML/Atom, etc. should do so idirectly and promptly exit before the HTML page can be rendered.
 // "Most" HTML resides in the view directory as text templates with macro substitution. 
 // They look like HTML with PHP variables but only a couple pass through the PHP processor - those with .php extensions.
 // The macro substitution is defined per page for the .tpl files. 
@@ -88,6 +89,11 @@ if(x($_SESSION,'sysmsg')) {
        unset($_SESSION['sysmsg']);
 }
 
+if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
+       header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
+}
+
+
 // Feel free to comment out this line on production sites.
 $a->page['content'] .= $debug_text;