MDL-22980, move mod/data/field/*/icon.gif to mod/data/pix/field/*.gif
authorDongsheng Cai <unoter@gmail.com>
Tue, 29 Jun 2010 07:20:51 +0000 (07:20 +0000)
committerDongsheng Cai <unoter@gmail.com>
Tue, 29 Jun 2010 07:20:51 +0000 (07:20 +0000)
13 files changed:
mod/data/lib.php
mod/data/pix/field/checkbox.gif [moved from mod/data/field/checkbox/icon.gif with 100% similarity]
mod/data/pix/field/date.gif [moved from mod/data/field/date/icon.gif with 100% similarity]
mod/data/pix/field/file.gif [moved from mod/data/field/file/icon.gif with 100% similarity]
mod/data/pix/field/latlong.gif [moved from mod/data/field/latlong/icon.gif with 100% similarity, mode: 0755]
mod/data/pix/field/menu.gif [moved from mod/data/field/menu/icon.gif with 100% similarity]
mod/data/pix/field/multimenu.gif [moved from mod/data/field/multimenu/icon.gif with 100% similarity]
mod/data/pix/field/number.gif [moved from mod/data/field/number/icon.gif with 100% similarity]
mod/data/pix/field/picture.gif [moved from mod/data/field/picture/icon.gif with 100% similarity]
mod/data/pix/field/radiobutton.gif [moved from mod/data/field/radiobutton/icon.gif with 100% similarity]
mod/data/pix/field/text.gif [moved from mod/data/field/text/icon.gif with 100% similarity]
mod/data/pix/field/textarea.gif [moved from mod/data/field/textarea/icon.gif with 100% similarity]
mod/data/pix/field/url.gif [moved from mod/data/field/url/icon.gif with 100% similarity]

index efd8adf..41c1e03 100755 (executable)
@@ -429,8 +429,10 @@ class data_field_base {     // Base class for Database Field Types (see field/*/
     function image() {
         global $OUTPUT;
 
-        $str = '<a href="field.php?d='.$this->data->id.'&amp;fid='.$this->field->id.'&amp;mode=display&amp;sesskey='.sesskey().'">';
-        $str .= '<img src="'.$OUTPUT->pix_url('/field/' . $this->type . '/icon', 'data') . '" ';
+        $params = array('d'=>$this->data->id, 'fid'=>$this->field->id, 'mode'=>'display', 'sesskey'=>sesskey());
+        $link = new moodle_url('/mod/data/field.php', $params);
+        $str = '<a href="'.$link->out().'">';
+        $str .= '<img src="'.$OUTPUT->pix_url('field/'.$this->type, 'data') . '" ';
         $str .= 'height="'.$this->iconheight.'" width="'.$this->iconwidth.'" alt="'.$this->type.'" title="'.$this->type.'" /></a>';
         return $str;
     }
old mode 100644 (file)
new mode 100755 (executable)
similarity index 100%
rename from mod/data/field/latlong/icon.gif
rename to mod/data/pix/field/latlong.gif