From 9c7c53606a4f12fb2164292feed9f82351dfe1e8 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 9 Jun 2016 12:37:30 -0600 Subject: [PATCH] Still accept old style favorites on the client side, as they're still handled on the server side. Better fix than previous handling --- api/js/jsapi/app_base.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api/js/jsapi/app_base.js b/api/js/jsapi/app_base.js index f287989f9e..73806c49e2 100644 --- a/api/js/jsapi/app_base.js +++ b/api/js/jsapi/app_base.js @@ -916,11 +916,15 @@ var AppJS = (function(){ "use strict"; return Class.extend( favorite = egw.preference('favorite_'+this.dataset.id,self.appname); } if(!favorite || jQuery.isEmptyObject(favorite)) return; + + // Handle old style by making it like new style + if(favorite.filter && !favorite.state) + { + favorite.state = favorite.filter; + } var match_count = 0; - var extra_keys = favorite.state ? - Object.keys(favorite.state) : // New - Object.keys(favorite.filter); // Old + var extra_keys = Object.keys(favorite.state); for(var state_key in state) { extra_keys.splice(extra_keys.indexOf(state_key),1);