From 1f8754155bc5780aa755eec0d99c5cc02b40f992 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Sat, 3 Mar 2012 00:00:05 -0600 Subject: [PATCH] reverted https://github.com/mdipierro/web2py/commit/36f3571590f84755103d1ce74868875dbd6f7d53 and fixed a backward compatibility issue --- VERSION | 2 +- gluon/compileapp.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index d5c3ceb8..83fbfba3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.6 (2012-03-02 20:26:11) stable +Version 1.99.6 (2012-03-02 23:59:45) stable diff --git a/gluon/compileapp.py b/gluon/compileapp.py index 113abc60..60ceacc4 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -122,9 +122,6 @@ def LOAD(c=None, f='index', args=None, vars=None, is added on page loading without delay. """ from html import TAG, DIV, URL, SCRIPT, XML - create_div = True - if target is not None: - create_div = False if args is None: args = [] vars = Storage(vars or {}) target = target or 'c'+str(random.random())[2:] @@ -157,7 +154,7 @@ def LOAD(c=None, f='index', args=None, vars=None, else: statement = "web2py_component('%s','%s');" % (url, target) script = SCRIPT(statement, _type="text/javascript") - if create_div: + if not content is None: return TAG[''](script, DIV(content,**attr)) else: return TAG[''](script)