From 186d0ad9678c211477056af4b3d4505ef146df12 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 20 Mar 2008 16:18:15 +0000 Subject: [PATCH] Fix missing readonly parameter reported by randy houlahan, and pass it to the template --- etemplate/inc/class.ajax_select_widget.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.ajax_select_widget.inc.php b/etemplate/inc/class.ajax_select_widget.inc.php index b03b547253..95f00c2431 100644 --- a/etemplate/inc/class.ajax_select_widget.inc.php +++ b/etemplate/inc/class.ajax_select_widget.inc.php @@ -282,8 +282,10 @@ } $query['search'] = $value; + $result_list = array(); + $readonlys = array(); if(is_object($this->bo)) { - $count = $this->bo->$method($query, $result_list); + $count = $this->bo->$method($query, $result_list, $readonlys); } if(is_array($count)) { $count = count($result_list); @@ -309,7 +311,7 @@ $data = ($query['nextmatch_template']) ? array(1=>$row) : $row; $widget =& CreateObject('etemplate.etemplate', $query['template']); - $html = addslashes(str_replace("\n", '', $widget->show($data))); + $html = addslashes(str_replace("\n", '', $widget->show($data, '', $readonlys))); $row['title'] = htmlspecialchars(addslashes($row['title'])); $response->addScript("add_ajax_result('$result_id', '${row[$query['id_field']]}', '" . $row['title'] . "', '$html');"); $count++;