diff --git a/web/api.php b/web/api.php index 34b0085..e9d9f17 100644 --- a/web/api.php +++ b/web/api.php @@ -56,6 +56,7 @@ switch($action) $settings = loadSettings(); if($settings['DOMAINS']) $o = explode(',',$settings['DOMAINS']); + else $o = []; break; case 'attachment': $id = intval($_REQUEST['id']); diff --git a/web/index.html b/web/index.html index a16805d..1bbc98b 100644 --- a/web/index.html +++ b/web/index.html @@ -25,7 +25,7 @@
  - +
diff --git a/web/js/opentrashmail.js b/web/js/opentrashmail.js index ce3acc2..796c970 100644 --- a/web/js/opentrashmail.js +++ b/web/js/opentrashmail.js @@ -12,7 +12,9 @@ $( document ).ready(function() { loadAccount(email) $.get("api.php?a=getdoms",function(data){ - domains = data; + if(data.length>0) + domains = data; + else $("#btn-gen-random").hide(); },"json") });