From d61649958f205b0ad2a3c3a49f34a9269815f9b9 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 04 Aug 2014 13:03:59 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail

---
 program/js/app.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 490234b..8ac5ca2 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1451,7 +1451,7 @@
 
   this.is_framed = function()
   {
-    return (this.env.framed && parent.rcmail && parent.rcmail != this && parent.rcmail.command);
+    return this.env.framed && parent.rcmail && parent.rcmail != this && typeof parent.rcmail.command == 'function';
   };
 
   this.save_pref = function(prop)
@@ -5989,8 +5989,10 @@
   this.replace_folder_row = function(oldid, id, name, display_name, is_protected, class_name)
   {
     if (!this.gui_objects.subscriptionlist) {
-      if (this.is_framed)
-        return parent.rcmail.replace_folder_row(oldid, id, name, display_name, is_protected, class_name);
+      if (this.is_framed()) {
+        // @FIXME: for some reason this 'parent' variable need to be prefixed with 'window.'
+        return window.parent.rcmail.replace_folder_row(oldid, id, name, display_name, is_protected, class_name);
+      }
 
       return false;
     }

--
Gitblit v1.9.1