Commit 781ecbd7 authored by metzlerd's avatar metzlerd
Browse files

Fixing mulivalue paramters for drupal.

parent 2dd6726a
......@@ -71,7 +71,32 @@ class FrxDrupal extends FrxDataProvider {
public function format($value, $key, $data) {
$db = Database::getConnection('default');
if ($db) {
if ($value=='') $value = 'NULL'; else $value = $db -> quote($value);
if ($value=='')
$value = 'NULL';
else {
if (is_array($value)) {
if ($value == array()) {
$value = 'NULL';
}
else {
// Build a array of values string
$i=0;
$val = '';
foreach ($value as $v) {
$i++;
if ($i>1) {
$val .= ',';
}
$val .= $db->quote($v);
}
$value = $val;
}
}
else {
$value = trim($value);
$value = $db->quote($value) ;
}
}
}
return $value;
}
......
--ACCESS=administer permissions
SELECT * FROM {role_permission} p
WHERE p.rid = :role
\ No newline at end of file
WHERE p.rid=:role
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment