Ticket #7281 (new defect)

Opened 4 months ago

Last modified 2 months ago

Boolean value not being saved to mysql from grid.

Reported by: georges Owned by: BryanForbes
Priority: normal Milestone: 1.3
Component: DojoX Grid Version: 1.1.1
Severity: normal Keywords: mysql grid boolean
Cc:

Description

There are some problems with the file : dojo1.1.1/dojox/grid/tests/support/data.php

The loop starts with the first parameter and iterates through until it finds a param with empty values. What if the value IS empty. I changed the behavior by iterating through and ending when we have tried all params from 1 to count(columns).

ALSO,

You have to convert from json true/false (or in this case <empty>) to mysql 1/0.

Here is my version:

function getPostColumns() {

$columns = getColumns(); $nCount = count($columns); $a=array(); for ($i=0; $i < $nCount; $i++) {

$p=getPostString("_".$i); $r = new stdClass(); $r->name = $columns[$i]->Field; $r->value = ($columns[$i]->Type == "tinyint(1)" ? ($p ? 1 : 0) :$p); echo "$r->name" . "<br \>"; $a[] = $r;

} return $a;

}

Change History

Changed 4 months ago by bill

  • owner changed from alex to BryanForbes
  • component changed from TestFramework to DojoX Grid

Changed 4 months ago by BryanForbes

  • milestone changed from tbd to 1.2

Changed 2 months ago by bill

  • milestone changed from 1.2 to 1.3
Note: See TracTickets for help on using tickets.