Commit 091a772d authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#165141 by hswong3i: move literal values out of some core queries to support...

#165141 by hswong3i: move literal values out of some core queries to support cross-database compatibility (ie. better SQL parsing and altering options)
parent 6721bc58
......@@ -243,48 +243,48 @@ function system_install() {
// Load system theme data appropriately.
system_theme_data();
db_query("INSERT INTO {users} (uid,name,mail) VALUES(0,'','')");
db_query("INSERT INTO {users} (uid, name, mail) VALUES(%d, '%s', '%s')", 0, '', '');
db_query("INSERT INTO {role} (name) VALUES ('anonymous user')");
db_query("INSERT INTO {role} (name) VALUES ('authenticated user')");
db_query("INSERT INTO {role} (name) VALUES ('%s')", 'anonymous user');
db_query("INSERT INTO {role} (name) VALUES ('%s')", 'authenticated user');
db_query("INSERT INTO {permission} (rid,perm,tid) VALUES (1,'access content',0)");
db_query("INSERT INTO {permission} (rid,perm,tid) VALUES (2,'access comments, access content, post comments, post comments without approval',0)");
db_query("INSERT INTO {permission} (rid, perm, tid) VALUES (%d, '%s', %d)", 1, 'access content', 0);
db_query("INSERT INTO {permission} (rid, perm, tid) VALUES (%d, '%s', %d)", 2, 'access comments, access content, post comments, post comments without approval', 0);
db_query("INSERT INTO {variable} (name,value) VALUES('theme_default', 's:7:\"garland\";')");
db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name = 'garland'");
db_query("INSERT INTO {blocks} (module,delta,theme,status,pages) VALUES('user', '0', 'garland', 1, '')");
db_query("INSERT INTO {blocks} (module,delta,theme,status,pages) VALUES('user', '1', 'garland', 1, '')");
db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'theme_default', 's:7:"garland";');
db_query("UPDATE {system} SET status = %d WHERE type = '%s' AND name = '%s'", 1, 'theme', 'garland');
db_query("INSERT INTO {blocks} (module, delta, theme, status, pages) VALUES ('%s', '%s', '%s', %d, '%s')", 'user', '0', 'garland', 1, '');
db_query("INSERT INTO {blocks} (module, delta, theme, status, pages) VALUES ('%s', '%s', '%s', %d, '%s')", 'user', '1', 'garland', 1, '');
db_query("INSERT INTO {node_access} VALUES (0, 0, 'all', 1, 0, 0)");
db_query("INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", 0, 0, 'all', 1, 0, 0);
// Add input formats.
db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('Filtered HTML', ',1,2,', 1)");
db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('Full HTML', '', 1)");
db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Filtered HTML', ',1,2,', 1);
db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Full HTML', '', 1);
// Enable filters for each input format.
// Filtered HTML:
// URL filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 2, 0)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 2, 0);
// HTML filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 0, 1)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 0, 1);
// Line break filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 1, 2)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 1, 2);
// HTML corrector filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 3, 10)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 3, 10);
// Full HTML:
// URL filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (2, 'filter', 2, 0)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 2, 0);
// Line break filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (2, 'filter', 1, 1)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 1, 1);
// HTML corrector filter.
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 3, 10)");
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 3, 10);
db_query("INSERT INTO {variable} (name,value) VALUES ('filter_html_1','i:1;')");
db_query("INSERT INTO {variable} (name, value) VALUES ('%s','%s')", 'filter_html_1', 'i:1;');
db_query("INSERT INTO {variable} (name, value) VALUES ('node_options_forum', '%s')", 'a:1:{i:0;s:6:"status";}');
db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'node_options_forum', 'a:1:{i:0;s:6:"status";}');
}
// Updates for core
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment