|
|
@ -741,7 +741,7 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) { |
|
|
|
$dsLabel = $form_state['values']['dsLabel']; |
|
|
|
$dsLabel = $form_state['values']['dsLabel']; |
|
|
|
|
|
|
|
|
|
|
|
$streamUrl = ($file !== NULL) ? |
|
|
|
$streamUrl = ($file !== NULL) ? |
|
|
|
url($file->filepath, array('absolute' => TRUE)): |
|
|
|
$file->filepath: |
|
|
|
url($form_state['values']['reference'], array('absolute' => TRUE)); |
|
|
|
url($form_state['values']['reference'], array('absolute' => TRUE)); |
|
|
|
|
|
|
|
|
|
|
|
// Remove the original file extension from the label and add the new one |
|
|
|
// Remove the original file extension from the label and add the new one |
|
|
@ -751,10 +751,9 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) { |
|
|
|
substr($streamUrl, strrpos($streamUrl, '.')); // Add the file extention to the end of the label. |
|
|
|
substr($streamUrl, strrpos($streamUrl, '.')); // Add the file extention to the end of the label. |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$dformat = $form_state['storage']['mime_type']; |
|
|
|
$dformat = $form_state['storage']['mime_type']; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); |
|
|
|
$item = new Fedora_Item($pid); |
|
|
|
$item = new Fedora_Item($pid); |
|
|
|
$item->modify_datastream($streamUrl, $dsid, $dsLabel, $dformat); |
|
|
|
$item->modify_datastream($streamUrl, $dsid, $dsLabel, $dformat); |
|
|
|
|
|
|
|
|
|
|
@ -966,9 +965,7 @@ function makeObject($pid, $dsID) { |
|
|
|
* drupal_render(). |
|
|
|
* drupal_render(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function fedora_repository_islandora_tabs($content_models, $pid, $page_number) { |
|
|
|
function fedora_repository_islandora_tabs($content_models, $pid, $page_number) { |
|
|
|
$cmodels_tabs = array( |
|
|
|
$cmodels_tabs = array(); |
|
|
|
'#type' => 'tabset', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($content_models as $content_model) { |
|
|
|
foreach ($content_models as $content_model) { |
|
|
|
$content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number); |
|
|
|
$content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number); |
|
|
@ -1025,17 +1022,26 @@ function fedora_repository_islandora_tabs_alter(&$tabs, $params) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Sends an ITQL query to the Fedora Resource index (can only communicate with Kowari or mulgara) |
|
|
|
* Menu callback for "fedora/repository". |
|
|
|
* Reads the pid and datastream id as url parameters. Queries the collection object for the query |
|
|
|
* |
|
|
|
* if there is no query datastream falls back to the query shipped with the module. |
|
|
|
* If user is allow, and we are given a PID and a sensical DSID, return the |
|
|
|
|
|
|
|
* datastream via the makeObject() function; otherwise, call out to the PIDs' |
|
|
|
|
|
|
|
* ContentModels and all Drupal modules for Islandora tabs. |
|
|
|
* |
|
|
|
* |
|
|
|
* @global type $user |
|
|
|
* @global $user stdObject |
|
|
|
* @param type $pid |
|
|
|
* @param $pid string |
|
|
|
* @param type $dsId |
|
|
|
* An optional string containing the PID of an object. (defaults to islandora:root) |
|
|
|
* @param type $collection |
|
|
|
* @param $dsId string |
|
|
|
* @param type $page_number |
|
|
|
* An optional string containing the dsid of an object. ("-" will be ignored |
|
|
|
* @param type $limit |
|
|
|
* to allow later parameters without including one). |
|
|
|
* @return type |
|
|
|
* @param $collection string |
|
|
|
|
|
|
|
* The collection name... Deprecated. |
|
|
|
|
|
|
|
* @param $page_number string/integer(?) |
|
|
|
|
|
|
|
* A page number to start on... Seems to be going towards deprecation? |
|
|
|
|
|
|
|
* @param $limit string/integer(?) |
|
|
|
|
|
|
|
* Used to limit the number of results returned? Deprecated? |
|
|
|
|
|
|
|
* @return string |
|
|
|
|
|
|
|
* A string containing markup for the rendered tabs. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) { |
|
|
|
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) { |
|
|
|
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); |
|
|
@ -1108,7 +1114,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU |
|
|
|
$cmodels_tabs = array( |
|
|
|
$cmodels_tabs = array( |
|
|
|
'#type' => 'tabset', |
|
|
|
'#type' => 'tabset', |
|
|
|
); |
|
|
|
); |
|
|
|
$cmodels_tabs = array_merge($cmodels_tabs, $hook_tabs); |
|
|
|
$cmodels_tabs += $hook_tabs; |
|
|
|
|
|
|
|
|
|
|
|
//Assemble parameters, to pass during alter |
|
|
|
//Assemble parameters, to pass during alter |
|
|
|
$params = array( |
|
|
|
$params = array( |
|
|
|