Fixes bug on news feed links showing up in Open Search RSS, a=chris

Chris Pollett [2013-04-05 01:Apr:th]
Fixes bug on news feed links showing up in Open Search RSS, a=chris
Filename
controllers/search_controller.php
views/rss_view.php
diff --git a/controllers/search_controller.php b/controllers/search_controller.php
index bde1727ce..aa8d0a5f3 100755
--- a/controllers/search_controller.php
+++ b/controllers/search_controller.php
@@ -404,6 +404,7 @@ class SearchController extends Controller implements CrawlConstants
                 }
             }
         }
+        $index_info = NULL;
         if($web_flag && $index_timestamp != 0) {
             $index_info =  $this->crawlModel->getInfoTimestamp(
                 $index_timestamp, $machine_urls);
@@ -416,8 +417,6 @@ class SearchController extends Controller implements CrawlConstants
                     if($index_info == array()) { $index_info = NULL; }
                 }
             }
-        } else if ($index_timestamp == 0) {
-            $index_info = NULL;
         }

         if(isset($_REQUEST['save_timestamp'])){
diff --git a/views/rss_view.php b/views/rss_view.php
index f61d8023a..e57f189cb 100644
--- a/views/rss_view.php
+++ b/views/rss_view.php
@@ -80,8 +80,9 @@ class RssView extends View implements CrawlConstants
                         $this->filetypeHelper->render($page[self::TYPE]);
                     }?></title>

-                <link><?php if(isset($page[self::TYPE])
-                    && $page[self::TYPE] != "link") {
+                <link><?php if(!isset($page[self::TYPE]) ||
+                    (isset($page[self::TYPE])
+                    && $page[self::TYPE] != "link")) {
                         e($page[self::URL]);
                     } else {
                         e(strip_tags($page[self::TITLE]));
@@ -102,4 +103,4 @@ class RssView extends View implements CrawlConstants
         }
     }
 }
-?>
\ No newline at end of file
+?>
ViewGit