Skip to content

Commit

Permalink
Merge pull request #1 from Islandora/7.x
Browse files Browse the repository at this point in the history
Update fork
  • Loading branch information
nmader committed May 9, 2017
2 parents 5c351d1 + b014b62 commit eaad46e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions islandora.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function hook_islandora_datastream_modified(AbstractObject $object, AbstractData
*
* @see hook_islandora_datastream_modified()
*/
function hook_cmodel_pid_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream, array $params) {
function hook_cmodel_pid_dsid_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream, array $params) {

}

Expand All @@ -377,7 +377,7 @@ function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
*
* @see hook_islandora_datastream_purged()
*/
function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $dsid) {
function hook_cmodel_pid_dsid_islandora_datastream_purged(AbstractObject $object, $dsid) {

}

Expand Down Expand Up @@ -746,7 +746,7 @@ function hook_cmodel_pid_islandora_derivative() {
/**
* Allows for the altering of defined derivative functions.
*/
function hook_islandora_derivative_alter(&$derivatives, AbstractObject $object, $ds_modified_params = array()) {
function hook_islandora_derivative_alter(&$derivatives, AbstractObject $object = NULL, $ds_modified_params = array()) {
foreach ($derivatives as $key => $derivative) {
if ($derivative['destination_dsid'] == 'TN') {
unset($derivatives[$key]);
Expand Down
4 changes: 2 additions & 2 deletions islandora.module
Original file line number Diff line number Diff line change
Expand Up @@ -2094,8 +2094,8 @@ function islandora_conditionally_clear_cache() {
// batches, since they are not in response to GUI actions.
'_batch_process' => 'islandora_schedule_cache_clear_for_batch',
);

foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS & ~DEBUG_BACKTRACE_PROVIDE_OBJECT) as $frame) {
$options = (version_compare(PHP_VERSION, '5.3.6', '>=') ? DEBUG_BACKTRACE_IGNORE_ARGS & ~DEBUG_BACKTRACE_PROVIDE_OBJECT : FALSE);
foreach (debug_backtrace($options) as $frame) {
$function_name = strtolower($frame['function']);
if (isset($functions[$function_name])) {
$clear = TRUE;
Expand Down
2 changes: 1 addition & 1 deletion tests/islandora_derivatives_test.module
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function islandora_derivatives_test_some_cmodel_islandora_derivative() {
/**
* Implements hook_islandora_CMODEL_PID_derivative_alter().
*/
function islandora_derivatives_test_some_cmodel_islandora_derivative_alter(&$derivatives, AbstractObject $object, $ds_modified_params) {
function islandora_derivatives_test_some_cmodel_islandora_derivative_alter(&$derivatives, AbstractObject $object = NULL, $ds_modified_params = array()) {
// Use a mask to determine if only the label has been modified.
$diff = array_diff_key($ds_modified_params, array(
'label' => NULL,
Expand Down
24 changes: 12 additions & 12 deletions theme/theme.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
*/

/**
* Implements hook_preprocess_theme().
* Implements template_preprocess_HOOK().
*/
function islandora_preprocess_islandora_default_edit(array &$variables) {
function template_preprocess_islandora_default_edit(array &$variables) {
global $base_url;
$islandora_object = $variables['islandora_object'];
$datastreams = array();
Expand Down Expand Up @@ -116,9 +116,9 @@ function islandora_preprocess_islandora_default_edit(array &$variables) {
}

/**
* Implements hook_preprocess_theme().
* Implements template_preprocess_HOOK().
*/
function islandora_preprocess_islandora_default(&$variables) {
function template_preprocess_islandora_default(&$variables) {
drupal_add_js('misc/form.js');
drupal_add_js('misc/collapse.js');
$islandora_object = $variables['islandora_object'];
Expand Down Expand Up @@ -170,9 +170,9 @@ function islandora_preprocess_islandora_default(&$variables) {
}

/**
* Implements hook_preprocess_theme().
* Implements template_preprocess_HOOK().
*/
function islandora_preprocess_islandora_object_print(array &$variables) {
function template_preprocess_islandora_object_print(array &$variables) {
// Apply the print CSS in non print context.
$only_print_media = function($o) {
return $o['media'] == 'print';
Expand Down Expand Up @@ -623,9 +623,9 @@ function theme_islandora_datastream_regenerate_link(array $vars) {
}

/**
* Implements hook_preprocess().
* Implements template_preprocess_HOOK().
*/
function islandora_preprocess_islandora_dublin_core_display(array &$variables) {
function template_preprocess_islandora_dublin_core_display(array &$variables) {
$islandora_object = $variables['islandora_object'];
if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
try {
Expand All @@ -640,9 +640,9 @@ function islandora_preprocess_islandora_dublin_core_display(array &$variables) {
}

/**
* Implements hook_preprocess().
* Implements template_preprocess_HOOK().
*/
function islandora_preprocess_islandora_dublin_core_description(array &$variables) {
function template_preprocess_islandora_dublin_core_description(array &$variables) {
$islandora_object = $variables['islandora_object'];
if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
try {
Expand All @@ -660,9 +660,9 @@ function islandora_preprocess_islandora_dublin_core_description(array &$variable
}

/**
* Implements hook_preprocess().
* Implements template_preprocess_HOOK().
*/
function islandora_preprocess_islandora_object_overview(array &$variables) {
function template_preprocess_islandora_object_overview(array &$variables) {
$object = $variables['islandora_object'];
$cmodels = $object->models;
$links = array();
Expand Down

0 comments on commit eaad46e

Please sign in to comment.