? 933634-3-spaces-purl-activate.patch
Index: plugins/space_type_purl.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/spaces/plugins/Attic/space_type_purl.inc,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 space_type_purl.inc
--- plugins/space_type_purl.inc	11 Aug 2010 02:17:46 -0000	1.1.2.5
+++ plugins/space_type_purl.inc	8 Oct 2010 05:06:12 -0000
@@ -33,18 +33,18 @@ class space_type_purl extends space_type
    * space is active.
    */
   function activate() {
-    if (!$this->verify_purl()) {
-      $this->purge_request_destination();
-      // @TODO: This will drop other PURL providers. Probably not the desired behavior!
-      purl_goto($_GET['q'], array('query' => drupal_query_string_encode($_GET, array('q')), 'purl' => array('provider' => "spaces_{$this->type}", 'id' => $this->id)));
-    }
-
     // Activate the space before checking for excluded paths. This prevents
     // certain corner case badness, e.g. a stale $_GET['q'] set for the site
     // space triggering an excluded path check.
     $activated = parent::activate();
     $paths = implode("\n", $this->excluded_paths());
-    if (drupal_match_path($_GET['q'], $paths)) {
+    $excluded = drupal_match_path($_GET['q'], $paths);
+    if (!$excluded && !$this->verify_purl()) {
+      $this->purge_request_destination();
+      // @TODO: This will drop other PURL providers. Probably not the desired behavior!
+      purl_goto($_GET['q'], array('query' => drupal_query_string_encode($_GET, array('q')), 'purl' => array('provider' => "spaces_{$this->type}", 'id' => $this->id)));
+    }
+    elseif ($excluded) {
       $this->deactivate();
       return FALSE;
     }
Index: spaces_taxonomy/spaces_taxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/spaces/spaces_taxonomy/Attic/spaces_taxonomy.module,v
retrieving revision 1.1.2.4.2.4.2.6
diff -u -p -r1.1.2.4.2.4.2.6 spaces_taxonomy.module
--- spaces_taxonomy/spaces_taxonomy.module	6 Aug 2010 20:23:20 -0000	1.1.2.4.2.4.2.6
+++ spaces_taxonomy/spaces_taxonomy.module	8 Oct 2010 05:06:13 -0000
@@ -116,8 +116,6 @@ function spaces_taxonomy_form_taxonomy_f
     $tid = isset($form['tid']['#value']) ? $form['tid']['#value'] : 0;
     $space = spaces_load('taxonomy', $tid);
     if ($space) {
-      $space->activate();
-
       $form['spaces'] = array(
         '#type' => 'fieldset',
         '#title' => t('Spaces'),
