Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.x islandora 1042 #116

Merged
merged 3 commits into from
Sep 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ script:
- drush coder-review --reviews=production,security,style,i18n,potx,sniffer islandora_basic_collection
- phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora_solution_pack_collection
- drush test-run --uri=http://localhost:8081 "Islandora Basic Collection"
notifications:
irc: "irc.freenode.org#islandora"
5 changes: 0 additions & 5 deletions includes/ingest.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
// Constants.
define('ISLANDORA_BASIC_COLLECTION_FAKE_PID', 'fake:pid');

// @codingStandardsIgnoreStart
// XXX: This should be removed at some point in the future.
define('FAKE_PID', ISLANDORA_BASIC_COLLECTION_FAKE_PID);
// @codingStandardsIgnoreEnd

/**
* Manage action that for ingestion of an object into the given collection.
*
Expand Down
43 changes: 0 additions & 43 deletions islandora_basic_collection.module
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ define('ISLANDORA_BASIC_COLLECTION_CREATE_CHILD_COLLECTION', 'create child colle
define('ISLANDORA_BASIC_COLLECTION_MANAGE_COLLECTION_POLICY', 'manage collection policy');
define('ISLANDORA_BASIC_COLLECTION_MIGRATE_COLLECTION_MEMBERS', 'migrate collection members');

// @codingStandardsIgnoreStart
// XXX: These should be removed at somepoint in the future.
define('CREATE_CHILD_COLLECTION', ISLANDORA_BASIC_COLLECTION_CREATE_CHILD_COLLECTION);
define('MANAGE_COLLECTION_POLICY', ISLANDORA_BASIC_COLLECTION_MANAGE_COLLECTION_POLICY);
define('MIGRATE_COLLECTION_MEMBERS', ISLANDORA_BASIC_COLLECTION_MIGRATE_COLLECTION_MEMBERS);
// @codingStandardsIgnoreEnd

/**
* Implements hook_menu().
*/
Expand Down Expand Up @@ -529,42 +522,6 @@ function islandora_basic_collection_get_member_objects(AbstractObject $object, $
return array($count, $results);
}

/**
* Get objects associated with this object.
*
* Currently, we are only concerned with the with isMemberOf and
* isMemberOfCollection relationships.
*
* @deprecated
* Deprecated in favour of islandora_basic_collection_get_member_objects(),
* which should actually be able to page through results.
*
* @param AbstractObject $object
* The collection object whose members will be fetched.
* @param int $page_number
* The page number in the query for members.
* @param int $page_size
* The number of results per page page from the query for members.
*
* @return array|string
* The array of query results as provided by
* RepositoryQuery::parseSparqlResults().
*/
function islandora_basic_collection_get_objects(AbstractObject $object, $page_number = 0, $page_size = -1) {
module_load_include('inc', 'islandora', 'includes/utilities');
$message = islandora_deprecated('7.x-1.2', 'Use islandora_basic_collection_get_member_objects() to page and avoid potential memory issues with large collections.');
trigger_error(filter_xss($message), E_USER_DEPRECATED);

$new_results = islandora_basic_collection_get_member_objects($object, $page_number, $page_size);
if ($new_results) {
return $new_results[1];
}
else {
drupal_set_message(t('Error getting related objects for %s', array('%s' => $object->id)), 'error');
return '';
}
}

/**
* Get all existing collections.
*
Expand Down