Skip to content

Commit

Permalink
Made script work with 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vyshane committed Feb 24, 2006
1 parent 59a488e commit 4e53996
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mod/data/field/file/field.class.php
Expand Up @@ -101,7 +101,7 @@ function display_add_field($id, $rid=0){
$str .= get_string('file','data'). ': <input type="file" name ="field_'.$field->id.'" id="field_'.$field->id.'" title="'.$field->description.'" /><br />';
$str .= get_string('optionalfilename','data').': <input type="text" name="field_'
.$field->id.'_1" id="field_'.$field->id.'_1" value="'.$displayname.'" /><br />';
$str .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.$field->param4.'" />';
$str .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.$field->param3.'" />';
$str .= '</div>';

//print icon
Expand Down Expand Up @@ -263,7 +263,7 @@ function delete_data_contents() {
"WHERE df.id = {$this->id} ".
"AND dc.fieldid = {$this->id}";

if (!$results = recordset_to_array(get_recordset_sql($sql))) {
if (!$results = get_records_sql($sql)) {
return false;
}
foreach ($results as $result) {
Expand Down
2 changes: 1 addition & 1 deletion mod/data/filter.php
Expand Up @@ -41,7 +41,7 @@ function data_filter($courseid, $text) {
"AND df.type = 'text' " .
'AND df.param1 = 1';

if (!$datacontents = recordset_to_array(get_recordset_sql($sql))) {
if (!$datacontents = get_records_sql($sql)) {
return $text;
}

Expand Down

0 comments on commit 4e53996

Please sign in to comment.