|
|
@ -58,8 +58,10 @@ function fedora_repository_solution_packs_page() { |
|
|
|
* some objects are missing. |
|
|
|
* some objects are missing. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param array &$form_state |
|
|
|
* @param array &$form_state |
|
|
|
* @param array $solution_pack_module |
|
|
|
* @param unknown $solution_pack_module |
|
|
|
* @param array $solution_pack_name |
|
|
|
* @param string $solution_pack_name |
|
|
|
|
|
|
|
* @param array $objects |
|
|
|
|
|
|
|
* Defaults to an empty array. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function fedora_repository_solution_pack_form(&$form_state, $solution_pack_module, $solution_pack_name, $objects = array()) { |
|
|
|
function fedora_repository_solution_pack_form(&$form_state, $solution_pack_module, $solution_pack_name, $objects = array()) { |
|
|
|
|
|
|
|
|
|
|
@ -200,12 +202,10 @@ function fedora_repository_solution_pack_form_submit($form, &$form_state) { |
|
|
|
|
|
|
|
|
|
|
|
foreach ($solution_pack_info[$module_name]['objects'] as $object) { |
|
|
|
foreach ($solution_pack_info[$module_name]['objects'] as $object) { |
|
|
|
// Add this object to the batch job queue. |
|
|
|
// Add this object to the batch job queue. |
|
|
|
$batch['operations'][] = array('fedora_repository_batch_reingest_object', array($object)); |
|
|
|
// Module name is needed in the finished callback. |
|
|
|
|
|
|
|
$batch['operations'][] = array('fedora_repository_batch_reingest_object', array($object, $module_name)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Used in postprocess hook. |
|
|
|
|
|
|
|
$_SESSION['solution_pack_module_name'] = $module_name; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tell the batch to call the function to send out a postprocess hook. |
|
|
|
// Tell the batch to call the function to send out a postprocess hook. |
|
|
|
$batch['finished'] = 'fedora_repository_solutionpack_send_postprocess'; |
|
|
|
$batch['finished'] = 'fedora_repository_solutionpack_send_postprocess'; |
|
|
|
|
|
|
|
|
|
|
@ -216,8 +216,10 @@ function fedora_repository_solution_pack_form_submit($form, &$form_state) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Writes a form entry into the database. |
|
|
|
* Writes a form entry into the database. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param unknown_type $form_name |
|
|
|
* @param string $form_name |
|
|
|
|
|
|
|
* The name of the form. |
|
|
|
* @param unknown_type $form_xml |
|
|
|
* @param unknown_type $form_xml |
|
|
|
|
|
|
|
* The form definition. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function solution_pack_add_form($form_name, $form_xml) { |
|
|
|
function solution_pack_add_form($form_name, $form_xml) { |
|
|
|
$result = db_result(db_query('Select name from {xml_forms} where name = "%s"', $form_name)); |
|
|
|
$result = db_result(db_query('Select name from {xml_forms} where name = "%s"', $form_name)); |
|
|
@ -233,8 +235,10 @@ function solution_pack_add_form($form_name, $form_xml) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Writes a form association to the database |
|
|
|
* Writes a form association to the database |
|
|
|
* |
|
|
|
* |
|
|
|
* @param unknown_type $content_model |
|
|
|
* @param string $content_model |
|
|
|
* @param unknown_type $form_name |
|
|
|
* content model PID |
|
|
|
|
|
|
|
* @param string $form_name |
|
|
|
|
|
|
|
* Name of the form |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function solution_pack_add_form_association($content_model, $form_name) { |
|
|
|
function solution_pack_add_form_association($content_model, $form_name) { |
|
|
|
$result = db_result(db_query('Select content_model from {islandora_content_model_forms} where content_model = "%s" and form_name = "%s"', |
|
|
|
$result = db_result(db_query('Select content_model from {islandora_content_model_forms} where content_model = "%s" and form_name = "%s"', |
|
|
|