Project

General

Profile

« Previous | Next » 

Revision deba3cdd

Added by Andreas Kohlbecker almost 3 years ago

ref #9659 fixing ext_links edit link

View differences:

modules/cdm_dataportal/ext_links/ext_links.module
68 68
    'weight' => 1,
69 69
    'file' => 'ext_links.admin.inc',
70 70
  ];
71
  $items['admin/config/cdm_dataportal/ext_links/%link_template'] = [
72
    'title callback' => 'ext_links_admin_extlink_title',
73
    'title arguments' => [4],
71
  $items['admin/config/cdm_dataportal/ext_links/%ext_links'] = [ // %ext_links refers to ext_links_load
72
    'title' => 'Edit external link',
74 73
    'page callback' => 'ext_links_admin_link_template_page',
75 74
    'page arguments' => [4],
76 75
    'access arguments' => ['access administration pages'],
77 76
    'file' => 'ext_links.admin.inc',
78 77
  ];
79
  $items['admin/config/cdm_dataportal/ext_links/%link_template/status/%value'] = [
80
    'title' => 'Disable external link',
81
    'page callback' => 'drupal_get_form',
82
    'page arguments' => ['ext_links_admin_disable', 4],
83
    'access arguments' => ['access administration pages'],
84
    'file' => 'ext_links.admin.inc',
85
  ];
78
//  $items['admin/config/cdm_dataportal/ext_links/%link_template/status/%value'] = [
79
//    'title' => 'Disable external link',
80
//    'page callback' => 'drupal_get_form',
81
//    'page arguments' => ['ext_links_admin_disable', 4],
82
//    'access arguments' => ['access administration pages'],
83
//    'file' => 'ext_links.admin.inc',
84
//  ];
86 85
  return $items;
87 86
}
88 87

  
......
151 150
 * @see ext_links_exists()
152 151
 */
153 152
function ext_links_load($extlink_id) {
154
  $formats = ext_links_templates();
155
  return isset($formats[$extlink_id]) ? $formats[$extlink_id] : FALSE;
153
  $test = TRUE;
154
  if($test) {
155
    $defaults = ext_links_template_defaults();
156
    return isset($defaults[$extlink_id]) ? (object)$defaults[$extlink_id] : FALSE;
157
  }
158
  else {
159
   $formats = ext_links_templates();
160
    return isset($formats[$extlink_id]) ? $formats[$extlink_id] : FALSE;
161
  }
156 162
}
157 163

  
158 164
/**
......
798 804
    'category' => 'Classification',
799 805
  );
800 806
  $ext_links_default["eol"] = array(
801
    'nme' => "eol",
807
    'id' => "eol",
802 808
    'link' => 'http://eol.org/search/?q=',
803 809
    'title' => 'Search Encyclopaedia of Life...',
804 810
    'glue' => '+',

Also available in: Unified diff