Browse Source

Merge pull request #1 from Islandora/7.x

Update fork
pull/684/head
Neil Mader 8 years ago committed by GitHub
parent
commit
eaad46e63c
  1. 6
      islandora.api.php
  2. 4
      islandora.module
  3. 2
      tests/islandora_derivatives_test.module
  4. 24
      theme/theme.inc

6
islandora.api.php

@ -353,7 +353,7 @@ function hook_islandora_datastream_modified(AbstractObject $object, AbstractData
* *
* @see hook_islandora_datastream_modified() * @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) {
} }
@ -377,7 +377,7 @@ function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
* *
* @see hook_islandora_datastream_purged() * @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) {
} }
@ -746,7 +746,7 @@ function hook_cmodel_pid_islandora_derivative() {
/** /**
* Allows for the altering of defined derivative functions. * 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) { foreach ($derivatives as $key => $derivative) {
if ($derivative['destination_dsid'] == 'TN') { if ($derivative['destination_dsid'] == 'TN') {
unset($derivatives[$key]); unset($derivatives[$key]);

4
islandora.module

@ -2094,8 +2094,8 @@ function islandora_conditionally_clear_cache() {
// batches, since they are not in response to GUI actions. // batches, since they are not in response to GUI actions.
'_batch_process' => 'islandora_schedule_cache_clear_for_batch', '_batch_process' => 'islandora_schedule_cache_clear_for_batch',
); );
$options = (version_compare(PHP_VERSION, '5.3.6', '>=') ? DEBUG_BACKTRACE_IGNORE_ARGS & ~DEBUG_BACKTRACE_PROVIDE_OBJECT : FALSE);
foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS & ~DEBUG_BACKTRACE_PROVIDE_OBJECT) as $frame) { foreach (debug_backtrace($options) as $frame) {
$function_name = strtolower($frame['function']); $function_name = strtolower($frame['function']);
if (isset($functions[$function_name])) { if (isset($functions[$function_name])) {
$clear = TRUE; $clear = TRUE;

2
tests/islandora_derivatives_test.module

@ -48,7 +48,7 @@ function islandora_derivatives_test_some_cmodel_islandora_derivative() {
/** /**
* Implements hook_islandora_CMODEL_PID_derivative_alter(). * 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. // Use a mask to determine if only the label has been modified.
$diff = array_diff_key($ds_modified_params, array( $diff = array_diff_key($ds_modified_params, array(
'label' => NULL, 'label' => NULL,

24
theme/theme.inc

@ -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; global $base_url;
$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
$datastreams = array(); $datastreams = array();
@ -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/form.js');
drupal_add_js('misc/collapse.js'); drupal_add_js('misc/collapse.js');
$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
@ -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. // Apply the print CSS in non print context.
$only_print_media = function($o) { $only_print_media = function($o) {
return $o['media'] == 'print'; return $o['media'] == 'print';
@ -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']; $islandora_object = $variables['islandora_object'];
if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) { if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
try { try {
@ -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']; $islandora_object = $variables['islandora_object'];
if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) { if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
try { try {
@ -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']; $object = $variables['islandora_object'];
$cmodels = $object->models; $cmodels = $object->models;
$links = array(); $links = array();

Loading…
Cancel
Save