Revert of last commit and proper fix

This commit is contained in:
Miroslav Stampar 2012-12-29 10:35:05 +01:00
parent 0e18fa9c5f
commit 58ad2f1c5d

View File

@ -31,6 +31,7 @@ from lib.core.common import parseUnionPage
from lib.core.common import removeReflectiveValues from lib.core.common import removeReflectiveValues
from lib.core.common import singleTimeDebugMessage from lib.core.common import singleTimeDebugMessage
from lib.core.common import singleTimeWarnMessage from lib.core.common import singleTimeWarnMessage
from lib.core.common import unArrayizeValue
from lib.core.common import wasLastRequestDBMSError from lib.core.common import wasLastRequestDBMSError
from lib.core.convert import htmlunescape from lib.core.convert import htmlunescape
from lib.core.data import conf from lib.core.data import conf
@ -86,7 +87,7 @@ def _oneShotUnionUse(expression, unpack=True, limited=False):
singleTimeWarnMessage(warnMsg) singleTimeWarnMessage(warnMsg)
page = page.replace(kb.chars.stop[:-1], kb.chars.stop) page = page.replace(kb.chars.stop[:-1], kb.chars.stop)
retVal = _("(?P<result>%s.*?%s)" % (kb.chars.start, kb.chars.stop)) retVal = _("(?P<result>%s.*%s)" % (kb.chars.start, kb.chars.stop))
if retVal is not None: if retVal is not None:
retVal = getUnicode(retVal, kb.pageEncoding) retVal = getUnicode(retVal, kb.pageEncoding)
@ -189,7 +190,7 @@ def unionUse(expression, unpack=True, dump=False):
countedExpression = countedExpression[:_] countedExpression = countedExpression[:_]
output = _oneShotUnionUse(countedExpression, unpack) output = _oneShotUnionUse(countedExpression, unpack)
count = parseUnionPage(output) count = unArrayizeValue(parseUnionPage(output))
if isNumPosStrValue(count): if isNumPosStrValue(count):
if isinstance(stopLimit, int) and stopLimit > 0: if isinstance(stopLimit, int) and stopLimit > 0: