update index after creating new article
authorChristian Weiske <cweiske@cweiske.de>
Thu, 26 Mar 2015 19:26:38 +0000 (20:26 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 26 Mar 2015 19:26:38 +0000 (20:26 +0100)
www/add-article.php
www/index.php

index ee24c9b10269dadc75cf395830ebdc4b6882fd0a..6e9a03850491ff129354adbb8e3cb9d5911f98f2 100644 (file)
@@ -28,7 +28,7 @@ file_put_contents(
 </html>
 HTM
 );
-echo "saved as " . $file . "\n";
+//echo "saved as " . $file . "\n";
 
 //hub-notification
 $params = array(
@@ -58,6 +58,7 @@ $res = file_get_contents($hub, false, $ctx);
 list($http, $code, $rest) = explode(' ', $http_response_header[0]);
 if (intval($code / 100) === 2) {
     echo "notified hub\n";
+    header('Location: /');
     exit();
 }
 
index 0eaefb66b73e9e35a01e9d1dfc2a06d68add5a48..0a205f80943041fc1f3540dd170fd3c00269f390 100644 (file)
@@ -23,9 +23,8 @@ krsort($articles);
   <title>PubSubHubbub tester</title>
  </head>
  <body class="h-feed">
-  <iframe src="" id="addview" name="addview" style="position: absolute; right: 0.5ex; width: 60ex; height: 10ex; border: 1px solid grey"></iframe>
   <p>
-   <a href="add-article.php" target="addview">create new article</a>
+   <a href="add-article.php">create new article</a>
   </p>
   <h1>Articles</h1>
   <?php foreach ($articles as $article) { ?>