Skip to content

Commit

Permalink
switched back to fedora_repository
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoodhead committed Oct 11, 2011
1 parent 64287b9 commit 90c0ccb
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions book.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
class IslandoraBook {

function __construct($pid = '') {
module_load_include('inc', 'islandora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
if (!empty($pid)) {
$this->pid = $pid;
$this->item = new Fedora_Item($pid);
}
}

public function showFieldSets() {
module_load_include('inc', 'islandora_repository', 'plugins/tagging_form');
module_load_include('inc', 'islandora_repository', 'plugins/DarwinCore');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');
module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore');
module_load_include('module', 'islandora_book');
global $base_url;
$show_purge_tab = (!empty($_POST['form_id']) && ($_POST['form_id'] == 'islandora_book_purge_pages_form'));
Expand Down Expand Up @@ -162,8 +162,8 @@ function book_add_pages_form_submit($form, &$form_state) {
ok
*/
function ibook_create_page_objects($pid, $image_list = array(), $page_cmodel = 'islandora-book:pageCModel', $relation = 'isMemberOfCollection', $tmpDir) {
module_load_include('inc', 'islandora_repository', 'api/fedora_item');
module_load_include('inc', 'islandora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$book = new Fedora_Item($pid);
if (!$book->exists()) {
return FALSE;
Expand Down Expand Up @@ -201,8 +201,8 @@ function ibook_create_page_objects($pid, $image_list = array(), $page_cmodel = '
}

function ibook_add_single_page_object($book_pid, $page_file, $page_num = 1, $page_title = NULL, $page_cmodel = 'islandora-book:pageCModel', $relation = 'isMemberOfCollection') {
module_load_include('inc', 'islandora_repository', 'api/fedora_utils');
module_load_include('inc', 'islandora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$page_item = Fedora_Item::ingest_new_item("$book_pid-" . sprintf("%03d", $page_num), 'A', $page_title);
$page_item->add_relationship('hasModel', $page_cmodel, FEDORA_MODEL_URI);
$page_item->add_relationship($relation, $book_pid);
Expand Down Expand Up @@ -259,7 +259,7 @@ function deleteDirectory($dir) {
}

function makePDF($book_pid, $file_list, $tmpDir) {
module_load_include('inc', 'islandora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$book_item = new Fedora_Item($book_pid);
$outputFile = "${tmpDir}book.pdf";
$tiffs = array();
Expand Down
14 changes: 7 additions & 7 deletions image_rotator_tagger_block.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@


function get_random_image() {
module_load_include('inc', 'islandora_repository', 'CollectionClass');
module_load_include('inc', 'islandora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'CollectionClass');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$itqlquery = 'select $object $title from <#ri>
where $object <info:fedora/fedora-system:def/relations-external#isMemberOfCollection> <info:fedora/ilives:figures>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>
Expand Down Expand Up @@ -47,8 +47,8 @@ and $object <dc:title> $title';


function _fedora_image_rotator_tagger_block_content() {
module_load_include('inc', 'islandora_repository', 'api/fedora_item');
module_load_include('inc', 'islandora_repository', 'plugins/tagging_form');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');

global $base_url;
if (!empty($_POST['pid'])) {
Expand All @@ -71,7 +71,7 @@ function _fedora_image_rotator_tagger_block_content() {
return '<p>'
. l( '<img src="'. $base_url . '/fedora/imageapi/'. $result['pid'] . '/JPG?op=scale&height=500&width=300" />', 'fedora/repository/'. $result['pid'], array('html' => TRUE, 'alias' => TRUE))
.'<p>This image is from '. l($result['title'], 'fedora/ilives_book_viewer/'. substr($image_item->pid, 0, strrpos($image_item->pid, '-')), array('html' => TRUE, 'alias' => TRUE)) . '.'
. drupal_get_form('islandora_repository_image_tagging_form', $result['pid']) . '</p>';
. drupal_get_form('fedora_repository_image_tagging_form', $result['pid']) . '</p>';
}
else {
return '';
Expand All @@ -95,13 +95,13 @@ class ShowILivesStreamsInFieldSets {
}

function showJPG() {
module_load_include('inc', 'islandora_repository', 'plugins/tagging_form');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');
global $base_url;
$collection_fieldset = array(
'#collapsible' => FALSE,
'#value' => '<a href="' . $base_url . '/fedora/repository/' . $this->pid . '/JPG/"><img src="' . $base_url . '/fedora/repository/' . $this->pid . '/JPG/JPG.jpg' . '" /></a>',
);
return theme('fieldset', $collection_fieldset)
. drupal_get_form('islandora_repository_image_tagging_form', $this->pid);
. drupal_get_form('fedora_repository_image_tagging_form', $this->pid);
}
}
2 changes: 1 addition & 1 deletion islandora_book.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = Islandora Book Solution Pack
description = Provides book interface
package = Islandora Solution Pack
dependencies[] = islandora_repository
dependencies[] = fedora_repository
dependencies[] = xml_forms
dependencies[] = islandora_content_model_forms
version = 11.2.beta2
Expand Down
10 changes: 5 additions & 5 deletions islandora_book.module
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function islandora_book_book_viewer($pid) {
// it will execute it against the book.
function islandora_book_create_book_view($pid, $query = NULL) {
global $user;
module_load_include('inc', 'islandora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$path = drupal_get_path('module', 'islandora_book');
$objectHelper = new ObjectHelper;
$xml = $objectHelper->getStream($pid, 'MODS');
Expand Down Expand Up @@ -115,7 +115,7 @@ function islandora_book_create_book_view($pid, $query = NULL) {
$output .= $newdom->saveXML();
}
if (isset($query)) {
module_load_include('inc', 'islandora_repository', 'SearchClass');
module_load_include('inc', 'fedora_repository', 'SearchClass');
$searchClass = new SearchClass();
$pageQuery = convert_query_to_page_query($query, $pid);
$output .= '<div>' . $searchClass->custom_search($pageQuery, $startPage, '/xsl/pageResults.xsl', 500) . '</div>'; //limit results to 500 pages of a book since there is no paging if we enable paging in xslt this can be changed
Expand Down Expand Up @@ -194,7 +194,7 @@ function islandora_book_theme() {
function islandora_book_requirements($phase) {
global $base_url;
if ($phase == 'runtime') {
module_load_include('inc', 'islandora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$requirements['iiv-war'] = array();
$requirements['iiv-war']['title'] = t("Islandora OpenLayers image viewer web app");
if (!_islandora_book_viewer_available()) {
Expand Down Expand Up @@ -396,7 +396,7 @@ function islandora_book_purge_pages_form(&$form_state, $pid, $referrer = NULL) {

$form['submit'] = array(
'#type' => 'image_button',
'#src' => drupal_get_path('module', 'islandora_repository') . '/images/purge_big.png',
'#src' => drupal_get_path('module', 'fedora_repository') . '/images/purge_big.png',
'#value' => t('Purge'),
'#suffix' => 'Purge all pages associated with this book',
);
Expand All @@ -412,7 +412,7 @@ function islandora_book_purge_pages_form(&$form_state, $pid, $referrer = NULL) {
}

function islandora_book_purge_pages_form_submit($form, &$form_state) {
module_load_include('inc', 'islandora_repository', 'ConnectionHelper');
module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
$pid = $form_state['values']['pid'];
if (!isset($form_state['storage']['confirm'])) {
$form_state['storage']['confirm'] = TRUE; // this will cause the form to be rebuilt, entering the confirm part of the form
Expand Down
4 changes: 2 additions & 2 deletions tests/fedora_ilives.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class FedoraBookTestCase extends DrupalWebTestCase {
}

function setUp() {
parent::setUp('islandora_repository', 'fedora_ilives', 'tabs');
parent::setUp('fedora_repository', 'fedora_ilives', 'tabs');

module_load_include('inc', 'islandora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');

// Create and login user.
$repository_user = $this->drupalCreateFedoraUser(array('add fedora datastreams',
Expand Down
2 changes: 1 addition & 1 deletion xml/ilives_jp2Sdep-pageCModel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-02T17:52:31.539Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/islandora_repository/content_models/ilives_jp2Sdep-pageCModel.xml</audit:justification>
<audit:justification>Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_jp2Sdep-pageCModel.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
Expand Down
2 changes: 1 addition & 1 deletion xml/islandora_book_bookCModel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<datastream dsid="TN"></datastream>
</datastreams>
<ingest_form dsid="QDC" hide_file_chooser="true" page="2">
<form_builder_method class="FormBuilder" file="plugins/FormBuilder.inc" handler="handleQDCForm" method="buildQDCForm" module="islandora_repository"></form_builder_method>
<form_builder_method class="FormBuilder" file="plugins/FormBuilder.inc" handler="handleQDCForm" method="buildQDCForm" module="fedora_repository"></form_builder_method>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
Expand Down
2 changes: 1 addition & 1 deletion xml/islandora_book_jp2Sdef.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-01T01:40:47.337Z</audit:date>
<audit:justification>Ingested from local file /Users/al/islandora_repository/content_models/ilives_jp2Sdef.xml</audit:justification>
<audit:justification>Ingested from local file /Users/al/fedora_repository/content_models/ilives_jp2Sdef.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
Expand Down
2 changes: 1 addition & 1 deletion xsl/pageResults.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</xsl:variable>

<!-- <xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('islandora_repository_urlencode_string', $DCTITLE)"/>
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>-->
<xsl:variable name="recordNo">
<xsl:value-of select="position()"/>
Expand Down
2 changes: 1 addition & 1 deletion xsl/results.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
</xsl:variable>

<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('islandora_repository_urlencode_string', $DCTITLE)"/>
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<tr><td valign="top">
<a>
Expand Down

0 comments on commit 90c0ccb

Please sign in to comment.