Still accept old style favorites on the client side, as they're still handled on the server side.

Better fix than previous handling
This commit is contained in:
nathangray 2016-06-09 12:37:30 -06:00
parent 78a1768bc4
commit 9c7c53606a

View File

@ -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);