Browse Source

Merge branch '7.x' of github.com:Islandora/islandora into 7.x

pull/122/merge
jonathangreen 13 years ago
parent
commit
6058087c0b
  1. 4
      islandora_basic_collection/includes/CollectionPolicy.inc
  2. 8
      islandora_basic_collection/includes/child_collection.inc

4
islandora_basic_collection/includes/CollectionPolicy.inc

@ -20,9 +20,9 @@ class CollectionPolicy {
* @return CollectionPolicy
* The parsed collection policy.
*/
public function __construct($xmlStr) {
public function __construct($xml_string) {
$this->xml = new DOMDocument();
$this->xml->loadXML($xmlStr);
$this->xml->loadXML($xml_string);
$this->name = 'Collection Policy';
}

8
islandora_basic_collection/includes/child_collection.inc

@ -17,7 +17,15 @@ function islandora_create_child_collection_form($form, &$form_state, $collection
module_load_include('inc', 'islandora_basic_collection', 'includes/CollectionPolicy');
$policy_datastream = $collection_object->getDatastream(variable_get('Islandora_Collection_Policy_DSID', 'COLLECTION_POLICY'));
if (!$policy_datastream) {
$form['no_policy'] = array(
'#type' => 'item',
'#title' => t('No collection policy datastream found!'),
);
return $form;
}
$collection_policy = new CollectionPolicy($policy_datastream->content);
$current_content_models = $collection_policy->getContentModels();
$collection_content_model_exists = FALSE;

Loading…
Cancel
Save