summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-29 08:04:24 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-29 08:04:24 +0000
commit94c3dceedae0123f7a1bd518d00aa2839ca82d14 (patch)
tree807ea8505fec1bce86ef7f4bc584e46e917ca456 /profiles
parent1ed25923a356008fd0148de5d41ee3623d4c8f3e (diff)
downloadbrdo-94c3dceedae0123f7a1bd518d00aa2839ca82d14.tar.gz
brdo-94c3dceedae0123f7a1bd518d00aa2839ca82d14.tar.bz2
- Patch #240873 by Gábor Hojtsy: move custom help settings to blocks. Very exciting.
Diffstat (limited to 'profiles')
-rw-r--r--profiles/default/default.profile63
-rw-r--r--profiles/expert/expert.profile52
2 files changed, 106 insertions, 9 deletions
diff --git a/profiles/default/default.profile b/profiles/default/default.profile
index da4732edb..ab7f1be56 100644
--- a/profiles/default/default.profile
+++ b/profiles/default/default.profile
@@ -91,11 +91,64 @@ function default_profile_task_list() {
*/
function default_profile_tasks(&$task, $url) {
- // Enable 4 standard blocks.
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'login', 'garland', 1, 0, 'left', '', -1);
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'navigation', 'garland', 1, 0, 'left', '', -1);
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'management', 'garland', 1, 1, 'left', '', -1);
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'powered-by', 'garland', 1, 10, 'footer', '', -1);
+ // Enable 5 standard blocks.
+ $values = array(
+ array(
+ 'module' => 'user',
+ 'delta' => 'login',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 0,
+ 'region' => 'left',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'navigation',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 0,
+ 'region' => 'left',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'management',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 1,
+ 'region' => 'left',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'powered-by',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 10,
+ 'region' => 'footer',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'help',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 0,
+ 'region' => 'help',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ );
+ $query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
+ foreach ($values as $record) {
+ $query->values($record);
+ }
+ $query->execute();
// Insert default user-defined node types into the database. For a complete
// list of available node type attributes, refer to the node type API
diff --git a/profiles/expert/expert.profile b/profiles/expert/expert.profile
index 545f098db..b78fd1241 100644
--- a/profiles/expert/expert.profile
+++ b/profiles/expert/expert.profile
@@ -42,10 +42,54 @@ function expert_profile_task_list() {
* Perform any final installation tasks for this profile.
*/
function expert_profile_tasks(&$task, $url) {
- // Enable 3 standard blocks.
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'login', 'garland', 1, 0, 'left', '', -1);
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'navigation', 'garland', 1, 0, 'left', '', -1);
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'management', 'garland', 1, 1, 'left', '', -1);
+ // Enable 4 standard blocks.
+ $values = array(
+ array(
+ 'module' => 'user',
+ 'delta' => 'login',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 0,
+ 'region' => 'left',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'navigation',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 0,
+ 'region' => 'left',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'management',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 1,
+ 'region' => 'left',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ array(
+ 'module' => 'system',
+ 'delta' => 'help',
+ 'theme' => 'garland',
+ 'status' => 1,
+ 'weight' => 0,
+ 'region' => 'help',
+ 'pages' => '',
+ 'cache' => -1
+ ),
+ );
+ $query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
+ foreach ($values as $record) {
+ $query->values($record);
+ }
+ $query->execute();
}
/**