From b421894c1fd213e41cecbbce40d0b4662a3af93a Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Thu, 28 Oct 2010 16:11:54 +0000
Subject: [PATCH] Fix a bug when a site is created where WYSIWYG editing wasn't
 working.

git-svn-id: file:///tmp/wdn_thm_drupal/trunk@271 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 profiles/unl_profile/unl_profile.install | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/profiles/unl_profile/unl_profile.install b/profiles/unl_profile/unl_profile.install
index 9e89c719..f65a5cd3 100644
--- a/profiles/unl_profile/unl_profile.install
+++ b/profiles/unl_profile/unl_profile.install
@@ -261,8 +261,21 @@ EOF;
         module_enable(array('unl_cas'));
         
         
-        // Copy the authenticated user role's permissions for text formats from the default site.
-        db_query("REPLACE INTO {$new_prefix}role_permission (rid, permission, module) SELECT rid, permission, module FROM {$shared_prefix}role_permission WHERE rid=:rid AND module='filter'", array(':rid' => DRUPAL_AUTHENTICATED_RID));
+        // Copy the anonymous/authenticated user roles' permissions for text formats from the default site.
+        db_query(
+       	  "REPLACE INTO {$new_prefix}role_permission (rid, permission, module) "
+          . "SELECT rid, permission, module "
+          . "FROM {$shared_prefix}role_permission "
+          . "WHERE rid IN(:rid) AND module='filter' ",
+          array(':rid' => array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))
+        );
+        
+        db_query(
+          "REPLACE INTO {$new_prefix}variable (name, value) "
+          . "SELECT name, value "
+          . "FROM {$shared_prefix}variable "
+          . "WHERE name='filter_fallback_format' "
+        );
         
         // Create the Site Admin role
         $site_admin_role = new stdClass();
-- 
GitLab