1241 |
1241 |
$media = cdm_ws_get(CDM_WS_PORTAL_MEDIA, $mediaUuid);
|
1242 |
1242 |
if (!$media) {
|
1243 |
1243 |
drupal_set_title(t('Media does not exist'), PASS_THROUGH);
|
1244 |
|
return FALSE;
|
|
1244 |
return "";
|
1245 |
1245 |
}
|
1246 |
1246 |
return theme('cdm_media_page', array(
|
1247 |
1247 |
'media' => $media,
|
... | ... | |
1551 |
1551 |
$polytomousKey = cdm_ws_get(CDM_WS_POLYTOMOUSKEY, $polytomousKeyUuid);
|
1552 |
1552 |
if (!$polytomousKey) {
|
1553 |
1553 |
drupal_set_title(t('Polytomous key does not exist'), PASS_THROUGH);
|
1554 |
|
return FALSE;
|
|
1554 |
return "";
|
1555 |
1555 |
}
|
1556 |
1556 |
|
1557 |
1557 |
$sourcePager = cdm_ws_get(CDM_WS_POLYTOMOUSKEY, array($polytomousKeyUuid, 'sources'));
|
... | ... | |
1811 |
1811 |
*/
|
1812 |
1812 |
function cdm_dataportal_description_view($uuid, $descriptive_dataset_uuid = NULL) {
|
1813 |
1813 |
$description = cdm_ws_get(CDM_WS_PORTAL_DESCRIPTION, $uuid);
|
|
1814 |
$description_page = new stdClass();
|
1814 |
1815 |
if (empty($description)) {
|
1815 |
|
drupal_set_title(t('Description does not exist'), PASS_THROUGH);
|
1816 |
|
return FALSE;
|
1817 |
|
}
|
1818 |
|
$descriptionpage = new stdClass();
|
|
1816 |
$description_page->title = t('Description does not exist');
|
|
1817 |
drupal_set_title($description_page->title, PASS_THROUGH); // not necessary if correctly implemented as drupal node
|
|
1818 |
$description_page->content = "";
|
1819 |
1819 |
|
1820 |
|
$descriptionpage->title = $description->titleCache;
|
1821 |
|
drupal_set_title($descriptionpage->title); // not necessary if correctly implemented as drupal node
|
|
1820 |
} else {
|
|
1821 |
$description_page->title = $description->titleCache;
|
|
1822 |
drupal_set_title($description_page->title); // not necessary if correctly implemented as drupal node
|
1822 |
1823 |
|
1823 |
|
// Render the description page.
|
1824 |
|
$render_array = compose_cdm_description($description->uuid, $descriptive_dataset_uuid);
|
1825 |
|
$descriptionpage->content = drupal_render($render_array);
|
|
1824 |
// Render the description page.
|
|
1825 |
$render_array = compose_cdm_description($description->uuid, $descriptive_dataset_uuid);
|
|
1826 |
$description_page->content = drupal_render($render_array);
|
|
1827 |
}
|
1826 |
1828 |
|
1827 |
|
return $descriptionpage;
|
|
1829 |
return $description_page;
|
1828 |
1830 |
}
|
1829 |
1831 |
|
1830 |
1832 |
function cdm_dataportal_description_page_view($uuid, $descriptive_dataset_uuid = NULL) {
|
... | ... | |
1835 |
1837 |
return cdm_node_show_simulate($descriptionpage->content);
|
1836 |
1838 |
}
|
1837 |
1839 |
else {
|
1838 |
|
drupal_set_title(t('Description does not exist'), PASS_THROUGH);
|
1839 |
|
return false;
|
|
1840 |
return NULL;
|
1840 |
1841 |
}
|
1841 |
1842 |
}
|
1842 |
1843 |
|
fix #8718 humane error message in case the page does not exists: bug fixes and revering erroneously comitted change