]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix broken counter update after view/viefeed
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 21 May 2006 01:48:17 +0000 (02:48 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 21 May 2006 01:48:17 +0000 (02:48 +0100)
backend.php

index 1daf49aa0c5d03b61ae488ed061f6e8817bb17de..9fb06b605d1f6e5e91071a981e78e35ae3f639ae 100644 (file)
                        print "</div>";
 
                        print "<script type=\"text/javascript\">
-                               update_all_counters('$feed_id');
+                               try {
+                                       parent.update_all_counters('$feed_id');
+                               } catch (e) {
+                                       exception_error('view/footer', e);
+                               }
                        </script>";
                }
 
 
                print "</div>";
 
-               print "<script type=\"text/javascript\">
-                       document.onkeydown = hotkey_handler;
-                       // if (parent.daemon_enabled) parent.updateTitle('$feed_title');
-                       update_all_counters('$feed');
-               </script>";
-       
-               print '
-                       <script type="text/javascript">
+               print "
+                       <script type=\"text/javascript\">
+                               try {
+                                       document.onkeydown = hotkey_handler;
+                                       parent.update_all_counters(\"$feed\");
+                               } catch (e) {
+                                       exception_error(\"viewfeed/footer1\", e);
+                               }
+
                                /* for IE */
                                function statechange() {
-                                       if (document.readyState == "interactive") init();
+                                       if (document.readyState == \"interactive\") init();
                                }
-                       
+
                                if (document.readyState) {      
-                                       if (document.readyState == "interactive" || document.readyState == "complete") {
+                                       if (document.readyState == \"interactive\" || document.readyState == \"complete\") {
                                                init();
                                        } else {
                                                document.onreadystatechange = statechange;
                                        }
                                }
-                       </script>';
+                       </script>";
 
                print "</body></html>";
        }