From: Daniel Kinzler Date: Sat, 2 Sep 2006 09:40:29 +0000 (+0000) Subject: Bug 7196: Comply to strict JS checks: if a function has a return statement somewhere... X-Git-Tag: 1.31.0-rc.0~55858 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=d42980a501a45c6a7f96675197d4b8222430fc95;p=lhc%2Fweb%2Fwiklou.git Bug 7196: Comply to strict JS checks: if a function has a return statement somewhere, the last statement must be a return statement too. --- diff --git a/skins/common/ajax.js b/skins/common/ajax.js index a6876abe78..6cc652b36c 100644 --- a/skins/common/ajax.js +++ b/skins/common/ajax.js @@ -9,7 +9,7 @@ var sajax_request_type = "GET"; * it is injected. */ function sajax_debug(text) { - if (!sajax_debug_mode) return; + if (!sajax_debug_mode) return false; var e= document.getElementById('sajax_debug'); @@ -28,6 +28,8 @@ function sajax_debug(text) { m.appendChild( document.createTextNode( text ) ); e.appendChild( m ); + + return true; } /** @@ -49,6 +51,7 @@ function sajax_init_object() { A = new XMLHttpRequest(); if (!A) sajax_debug("Could not create connection object."); + return A; } @@ -126,10 +129,14 @@ function sajax_do_call(func_name, args, target) { else { alert("bad target for sajax_do_call: not a function or object: " + target); } + + return; } sajax_debug(func_name + " uri = " + uri + " / post = " + post_data); x.send(post_data); sajax_debug(func_name + " waiting.."); delete x; + + return true; }