Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12493/include
Modified Files:
functions_installer.inc.php
Log Message:
Move the db-table-creation-tasks back into a function for others to use.
To make sure it works, can somebody try an install with this modification?
It worked here, but you never know :-)
Index: functions_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_installer.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- functions_installer.inc.php 13 Dec 2004 15:55:48 -0000 1.20
+++ functions_installer.inc.php 13 Dec 2004 22:25:13 -0000 1.21
@@ -63,6 +63,20 @@
return true;
}
+/**
+* Creates the needed tables - beware, they will be empty and need to be stuffed with
+* default templates and such...
+*/
+function serendipity_installDatabase() {
+ global $serendipity;
+ $queries = serendipity_parse_sql_tables(S9Y_INCLUDE_PATH . 'sql/db.sql');
+ $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);
+
+ foreach ($queries as $query) {
+ serendipity_db_schema_import($query);
+ }
+}
+
function serendipity_query_default($optname, $default, $usertemplate = false, $type = 'string') {
global $serendipity;
|