View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
03773Bug reportsConditionspublic2009-11-13 16:40
Reportersteven8000 Assigned Toc_schmitz  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version1.86 
Fixed in Version1.87RC1 
Summary03773: limesurvey change javascript code
Description

When i write an if statement and i use the syntact "or" => || (if ((i==0)||(i>10))...)
After saving and reopening the code, the || are replaced with +.(if ((i==0)+(i>10))...)
When i run the survey and i look to the source, i also get a + instead of ||

The code is placed in the code editor of a group or question.

In my config file i have
$filterxsshtml = false;

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)7697
I will donate to the project if issue is resolved
BrowserIE 6
Database type & versionMSSQL 2005
Server OS (if known)Windows 2003 SP 2
Webserver software & version (if known)Windows 2003 SP 2
PHP Version5.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

jelo

jelo

2009-10-14 22:03

partner   ~09793

Looks like a problem with Windows / MSSQL. Or is || saved when entered in a textfield and not in the sourcecode? Did you try a different browser?

On 7679 and PHP 5.2.11 / Apache 1.3 / MySQL 5 I cannot reproduce the issue with Firefox 3.5.3.

user372

2009-10-14 23:54

  ~09794

@ Lemeur: Do you have an idea?

lemeur

lemeur

2009-10-24 15:14

developer   ~09852

Last edited: 2009-10-24 15:14

The bug is inside the Database Abstraction layer we use (adodb).

In the mssql driver, all double pipes (string concatenation operator in SQL) are replaced by '+' characters.

If you want a quick and very dirty workaround, just comment the following line:
if (is_string($sql)) $sql = str_replace('||','+',$sql);

In the following files:

  • classes/adodb/drivers/adodb-mssqlpo.inc.php (line 42 and 50)
  • classes/adodb/drivers/adodb-odbc_mssql.inc.php (line 181)

I would however not recommend this workaround for production use: it would be better to fix adodb, but I'm not able to to so.

Carsten, what do you think ?

c_schmitz

c_schmitz

2009-11-01 23:17

administrator   ~09941

There are several database layers for MSSQL to use.
Try 'mssql_n' or 'odbtp' as DB driver instead of odbc_mssql and report back if it solved your issue?

Issue History

Date Modified Username Field Change
2009-10-14 14:54 steven8000 New Issue
2009-10-14 14:54 steven8000 Status new => assigned
2009-10-14 14:54 steven8000 Assigned To => user372
2009-10-14 14:54 steven8000 LimeSurvey build number => 7697
2009-10-14 14:54 steven8000 Browser => IE 6
2009-10-14 14:54 steven8000 Database & DB-Version => MSSQL 2005
2009-10-14 14:54 steven8000 Operating System (Server) => Windows 2003 SP 2
2009-10-14 14:54 steven8000 Webserver => Windows 2003 SP 2
2009-10-14 14:54 steven8000 PHP Version => 5.2
2009-10-14 22:03 jelo Note Added: 09793
2009-10-14 23:53 user372 Assigned To user372 => lemeur
2009-10-14 23:54 user372 Note Added: 09794
2009-10-24 15:14 lemeur Assigned To lemeur => c_schmitz
2009-10-24 15:14 lemeur Note Added: 09852
2009-10-24 15:14 lemeur Note Edited: 09852
2009-10-24 15:14 lemeur Note Edited: 09852
2009-11-01 23:17 c_schmitz Note Added: 09941
2009-11-01 23:18 c_schmitz Status assigned => feedback
2009-11-01 23:32 c_schmitz Status feedback => resolved
2009-11-01 23:32 c_schmitz Fixed in Version => 1.87RC1
2009-11-01 23:32 c_schmitz Resolution open => fixed
2009-11-13 16:40 c_schmitz Status resolved => closed