/[drupal]/contributions/modules/mmedia/media.forms.inc
ViewVC logotype

Diff of /contributions/modules/mmedia/media.forms.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Tue Dec 16 15:11:46 2008 UTC revision 1.4, Thu Mar 19 13:31:53 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: media.forms.inc,v 1.1.2.3 2008/11/06 13:00:16 rhys Exp $  // $Id: media.forms.inc,v 1.3 2008/12/16 15:11:46 rhys Exp $
3    
4  /**  /**
5   *  The View media form   *  The View media form
6   */   */
7  function mmedia_view_form(&$form_state, $media) {  function mmedia_view_form(&$form_state, $media) {
8    // allow various other modules to do things to view    // allow various other modules to do things to view
9    $profile = variable_get('mmedia_view_profile', null);    $profile = variable_get('mmedia_view_profile', NULL);
10    $profile = ($profile && in_array($profile, mapi_profile_list()) ? array('profile' => $profile) : array());    $profile = ($profile && in_array($profile, mapi_profile_list()) ? array('profile' => $profile) : array());
11    
12    drupal_set_title(t($media->title));    drupal_set_title(t($media->title));
# Line 39  function mmedia_view_form(&$form_state, Line 39  function mmedia_view_form(&$form_state,
39  /**  /**
40   *  The Edit/Add media form   *  The Edit/Add media form
41   */   */
42  function mmedia_edit_form(&$form_state, $media, $type = null) {  function mmedia_edit_form(&$form_state, $media, $type = NULL) {
43    // useful for editing the details of a media file.    // useful for editing the details of a media file.
44    $edit = $media;    $edit = $media;
45    if (is_null($edit)) {    if (is_null($edit)) {
46      $edit = new stdClass;      $edit = new stdClass;
47      $edit->type = null;      $edit->type = NULL;
48      if (in_array($type, mapi_type_list($type))) {      if (in_array($type, mapi_type_list($type))) {
49        $edit->type = $type;        $edit->type = $type;
50      }      }
# Line 170  function mmedia_move_form(&$form_state, Line 170  function mmedia_move_form(&$form_state,
170        '#type' => 'radio',        '#type' => 'radio',
171        '#title' => $folders[$fid]['name'],        '#title' => $folders[$fid]['name'],
172        '#return_value' => $fid,        '#return_value' => $fid,
173        '#default_value' => ($fid == $media->fid ? $fid : false),        '#default_value' => ($fid == $media->fid ? $fid : FALSE),
174        '#parents' => array('folder'),        '#parents' => array('folder'),
175        '#suffix' => '</div>'        '#suffix' => '</div>'
176      );      );

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2