]> dev.renevier.net Git - syp.git/blobdiff - news.php
improve wizard (hand editing of settings.php is no more needed)
[syp.git] / news.php
index 6eb78e63efe9e10ff3258fb9c7f3407d4b8b59bb..cc06521a5b880cf4be43b436605ebfdcb9844200 100644 (file)
--- a/news.php
+++ b/news.php
@@ -2,10 +2,6 @@
 /* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
    license. */
 
-require_once ("./inc/settings.php");
-require_once ("./inc/db/mysql.php");
-require_once ("./inc/utils.php");
-
 function headers_callback ($output) {
     $etag = md5 ($output);
     if ((isset ($_SERVER ["HTTP_IF_NONE_MATCH"])) && 
@@ -63,7 +59,7 @@ function main ($features) {
     }
 
     if (SITETITLE) {
-        printf ("  <title>%s</title>\n", SITETITLE);
+        printf ("  <title>%s</title>\n", htmlspecialchars (SITETITLE));
     }
 
     if (WEBMASTERMAIL) {
@@ -124,6 +120,12 @@ function main ($features) {
     printf ("</feed>");
 }
 
+if (!@include_once ("./inc/settings.php")) {
+    exit ("server error");
+}
+require_once ("./inc/db/mysql.php");
+require_once ("./inc/utils.php");
+
 try {
     $connection->connect (DBHOST, DBUSER, DBPWD, DBNAME, DBPREFIX);
     $features = $connection->mostrecentfeatures (10);