From d42980a501a45c6a7f96675197d4b8222430fc95 Mon Sep 17 00:00:00 2001 From: Daniel Kinzler Date: Sat, 2 Sep 2006 09:40:29 +0000 Subject: [PATCH] Bug 7196: Comply to strict JS checks: if a function has a return statement somewhere, the last statement must be a return statement too. --- skins/common/ajax.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } -- 2.20.1