Update css to make first search result display better, more error checking in network and word iterator, a=chris

Chris Pollett [2013-01-07 23:Jan:th]
Update css to make first search result display better, more error checking in network and word iterator, a=chris
Filename
css/search.css
lib/index_bundle_iterators/network_iterator.php
lib/index_bundle_iterators/word_iterator.php
locale/en-US/statistics.txt
views/search_view.php
diff --git a/css/search.css b/css/search.css
index 707916308..50b90ed01 100755
--- a/css/search.css
+++ b/css/search.css
@@ -57,12 +57,6 @@ p
     width: 300px;
 }

-.result h2
-{
-    font-size: 14pt;
-    font-weight: normal;
-}
-
 .echo-link
 {
     color: green;
@@ -901,7 +895,7 @@ ul.in-list li
 {
     left: 0.5in;
     position: relative;
-    top: -0.6in;
+    top: -0.8in;
     width: 8in;
 }

@@ -918,7 +912,7 @@ ul.in-list li
 {
     position: relative;
     right: 0.5in;
-    top: -0.6in;
+    top: -0.8in;
     width: 8in;
 }

@@ -927,11 +921,11 @@ ul.in-list li
     color: #666;
     font-size: 14pt;
     float:right;
-    left: 1.5in;
     margin: 0.2in 0 0 0;
     padding: 0;
+    right: 1.5in;
     position: relative;
-    top: -0.6in;
+    top: -1in;
 }

 .html-rtl .serp-stats
@@ -939,11 +933,22 @@ ul.in-list li
     color: #666;
     font-size: 14pt;
     float: left;
+    left:1.5in;
     margin: 0.2in 0 0 0;
     padding: 0;
     position: relative;
-    right:1.5in;
-    top: -0.6in;
+    top: -1in;
+}
+
+.result
+{
+    clear: both;
+}
+
+.result h2
+{
+    font-size: 14pt;
+    font-weight: normal;
 }

 .serp-links-score
diff --git a/lib/index_bundle_iterators/network_iterator.php b/lib/index_bundle_iterators/network_iterator.php
index d7b83efac..91f175411 100644
--- a/lib/index_bundle_iterators/network_iterator.php
+++ b/lib/index_bundle_iterators/network_iterator.php
@@ -312,6 +312,9 @@ class NetworkIterator extends IndexBundleIterator
             $url = $sites[$index][self::URL];
             $title = $url;
         } else {
+            if(!isset($sites[$index])) {
+                $sites[$index] = array();
+            }
             $tmp = urlencode(print_r($sites[$index],
                 true));
             $title = 'URL not set';
diff --git a/lib/index_bundle_iterators/word_iterator.php b/lib/index_bundle_iterators/word_iterator.php
index 3a556b182..3f9ae3b18 100644
--- a/lib/index_bundle_iterators/word_iterator.php
+++ b/lib/index_bundle_iterators/word_iterator.php
@@ -209,8 +209,12 @@ class WordIterator extends IndexBundleIterator
         $this->index_name =  $index_name;
         $index = IndexManager::getIndex($index_name);
         $this->current_block_fresh = false;
-        $this->dictionary_info =
-            $index->dictionary->getWordInfo($word_key, true);
+        if($index->dictionary) {
+            $this->dictionary_info =
+                $index->dictionary->getWordInfo($word_key, true);
+        } else {
+            $this->dictionary_info = false;
+        }
         if ($this->dictionary_info === false) {
             $this->empty = true;
         } else {
@@ -524,4 +528,4 @@ class WordIterator extends IndexBundleIterator
     }

 }
-?>
\ No newline at end of file
+?>
diff --git a/locale/en-US/statistics.txt b/locale/en-US/statistics.txt
index b6bef56f0..5a165df53 100755
--- a/locale/en-US/statistics.txt
+++ b/locale/en-US/statistics.txt
@@ -1 +1 @@
-d:99;
\ No newline at end of file
+d:100;
\ No newline at end of file
diff --git a/views/search_view.php b/views/search_view.php
index 516c4f339..b51563008 100755
--- a/views/search_view.php
+++ b/views/search_view.php
@@ -149,19 +149,20 @@ class SearchView extends View implements CrawlConstants
         </div>
         <div id="spell-check" class="spell"><span class="hidden"
         >123</span></div>
+        <h2 class="serp-stats"><?php
+            if(MOBILE) {
+            } else {
+            $num_results = min($data['TOTAL_ROWS'],
+                $data['LIMIT'] + $data['RESULTS_PER_PAGE']);
+            $limit = min($data['LIMIT'] + 1, $num_results);
+             ?> <?php
+            e(tl('search_view_calculated', $data['ELAPSED_TIME']));?> <?php
+            e(tl('search_view_results', $limit, $num_results,
+                $data['TOTAL_ROWS']));
+            }
+        ?></h2>
         <div class="serp-results">
-            <h2 class="serp-stats"><?php
-                if(MOBILE) {
-                } else {
-                $num_results = min($data['TOTAL_ROWS'],
-                    $data['LIMIT'] + $data['RESULTS_PER_PAGE']);
-                $limit = min($data['LIMIT'] + 1, $num_results);
-                 ?> <?php
-                e(tl('search_view_calculated', $data['ELAPSED_TIME']));?> <?php
-                e(tl('search_view_results', $limit, $num_results,
-                    $data['TOTAL_ROWS']));
-                }
-            ?></h2>
+
             <?php
             foreach($data['PAGES'] as $page) {
                 if(isset($page[self::URL])) {
ViewGit