Browse Source

Merge branch '6.x' of git://github.com/Islandora/islandora into 6.x

Conflicts:
	api/fedora_item.inc
pull/160/head
Adam Vessey 13 years ago
parent
commit
95b0570c57
  1. 3
      ObjectHelper.inc
  2. 31
      api/fedora_item.inc
  3. 2
      plugins/fedora_imageapi.info
  4. 4
      plugins/qt_viewer.inc

3
ObjectHelper.inc

@ -178,6 +178,9 @@ class ObjectHelper {
if ($curl_stat !== FALSE) { if ($curl_stat !== FALSE) {
$info = curl_getinfo($ch); $info = curl_getinfo($ch);
// Fixes an IE issue (ISLANDORA-311)
// http://support.microsoft.com/kb/316431
drupal_set_header("Cache-Control: private", TRUE);
//Set what headers we can... //Set what headers we can...
if ($mimeType = $info['content_type']) { if ($mimeType = $info['content_type']) {

31
api/fedora_item.inc

@ -857,8 +857,26 @@ RDF;
return $relationships; return $relationships;
} }
function get_rdf_relationships() { /**
* Retrieves RELS-EXT values from item
*
* @param array $namespaces
* @return array
*/
function get_rdf_relationships($namespaces = null) {
if ($namespaces == NULL) {
$namespaces = array(
RELS_EXT_URI,
FEDORA_MODEL_URI,
ISLANDORA_PAGE_URI,
ISLANDORA_RELS_EXT_URI,
ISLANDORA_RELS_INT_URI,
);
}
if (!is_array($namespaces)) {
$namespaces = array($namespaces);
}
$relationships = array(); $relationships = array();
try { try {
$relsext = $this->get_datastream_dissemination('RELS-EXT'); $relsext = $this->get_datastream_dissemination('RELS-EXT');
@ -872,13 +890,16 @@ RDF;
$relsextxml->loadXML($relsext); $relsextxml->loadXML($relsext);
$relsextxml->normalizeDocument(); $relsextxml->normalizeDocument();
$allTags = array(); $allTags = array();
$allTags[] = $relsextxml->getElementsByTagNameNS(RELS_EXT_URI, '*'); foreach ($namespaces as $namespace) {
$allTags[] = $relsextxml->getElementsByTagNameNS(FEDORA_MODEL_URI, '*'); $allTags[] = $relsextxml->getElementsByTagNameNS($namespace, '*');
$allTags[] = $relsextxml->getElementsByTagNameNS(ISLANDORA_PAGE_URI, '*'); }
foreach ($allTags as $tags) { foreach ($allTags as $tags) {
foreach ($tags as $child) { foreach ($tags as $child) {
$value = preg_replace('/info:fedora\//', '', $child->getAttributeNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'resource')); $value = preg_replace('/info:fedora\//', '', $child->getAttributeNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'resource'));
if (!$value) {
$value = $child->textContent;
}
$relationships[$child->tagName][] = $value; $relationships[$child->tagName][] = $value;
} }
} }

2
plugins/fedora_imageapi.info

@ -3,5 +3,7 @@ description = Adds image manipulation support through a REST interface
package = Islandora Dependencies package = Islandora Dependencies
dependencies[] = fedora_repository dependencies[] = fedora_repository
dependencies[] = imageapi dependencies[] = imageapi
version = 6.x-dev version = 6.x-dev
core = 6.x core = 6.x

4
plugins/qt_viewer.inc

@ -151,7 +151,7 @@ class ShowQtStreamsInFieldSets {
'poster' => array( 'poster' => array(
'#type' => 'markup', '#type' => 'markup',
'#value' => theme('image', "fedora/repository/{$this->pid}/{$pframe->ID}/poster.jpg", '', '', NULL, FALSE) '#value' => theme('image', "fedora/repository/{$this->pid}/{$pframe->ID}/poster.jpg", '', '', NULL, FALSE)
) ),
'play' => array( 'play' => array(
'#type' => 'markup', '#type' => 'markup',
'#prefix' => '<div class="play" style="font-size: 128px; color: white; position: absolute; top: 50%; left: 50%; margin-top: -0.085em; margin-left: -0.33em; opacity: 0.9;">', '#prefix' => '<div class="play" style="font-size: 128px; color: white; position: absolute; top: 50%; left: 50%; margin-top: -0.085em; margin-left: -0.33em; opacity: 0.9;">',
@ -167,7 +167,7 @@ class ShowQtStreamsInFieldSets {
'#value' => l(t('Download Media File'), "fedora/repository/{$this->pid}/OBJ/MOV.mov", array('attributes' => array('class' => 'download'))), '#value' => l(t('Download Media File'), "fedora/repository/{$this->pid}/OBJ/MOV.mov", array('attributes' => array('class' => 'download'))),
); );
} }
$src = url("fedora/repository/{$this->pid}/{$media->ID}/MOV.mov"; $src = url("fedora/repository/{$this->pid}/{$media->ID}/MOV.mov");
$qtparams = "'autostart', '" . ($pframe !== FALSE ? 'TRUE' : 'FALSE') . "', "; $qtparams = "'autostart', '" . ($pframe !== FALSE ? 'TRUE' : 'FALSE') . "', ";
$init = <<<EOD $init = <<<EOD

Loading…
Cancel
Save