Révision 4eeb3b46
Ajouté par Assos Assos il y a presque 8 ans
drupal7/sites/all/modules/uuid/uuid.module | ||
---|---|---|
34 | 34 |
'title' => 'UUID redirector', |
35 | 35 |
'description' => 'Redirects requests for UUID URIs to the referenced entity.', |
36 | 36 |
'page callback' => 'uuid_redirector', |
37 |
// The access check is handled in the page callback. |
|
37 | 38 |
'access callback' => TRUE, |
38 | 39 |
'type' => MENU_CALLBACK, |
39 | 40 |
); |
... | ... | |
44 | 45 |
'page callback' => 'drupal_get_form', |
45 | 46 |
'page arguments' => array('uuid_admin_form'), |
46 | 47 |
'access arguments' => array('administer uuid'), |
47 |
'type' => MENU_NORMAL_ITEM, |
|
48 | 48 |
'file' => 'uuid.admin.inc', |
49 | 49 |
); |
50 | 50 |
|
... | ... | |
123 | 123 |
return array_fill_keys($hook_names, array('group' => 'uuid')); |
124 | 124 |
} |
125 | 125 |
|
126 |
|
|
127 | 126 |
/** |
128 | 127 |
* Implements hook_views_api(). |
129 | 128 |
*/ |
... | ... | |
155 | 154 |
* Implements hook_uuid_sync(). |
156 | 155 |
*/ |
157 | 156 |
function uuid_uuid_sync() { |
158 |
foreach (entity_get_info() as $entity_type => $info) {
|
|
157 |
foreach (entity_get_info() as $info) { |
|
159 | 158 |
if (isset($info['uuid']) && $info['uuid'] == TRUE && !empty($info['entity keys']['uuid'])) { |
160 | 159 |
_uuid_sync_table($info['base table'], $info['entity keys']['id'], $info['entity keys']['uuid']); |
161 | 160 |
if (!empty($info['entity keys']['revision uuid'])) { |
... | ... | |
231 | 230 |
|
232 | 231 |
drupal_goto($uri['path'], $uri['options'], 301); |
233 | 232 |
} |
234 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules