added new notes application. It still needs some work in moving to our db class and using out link function, but it works for mysql users

This commit is contained in:
seek3r 2000-11-17 16:34:27 +00:00
parent d46eb96a9c
commit 77d5d5a46c
8 changed files with 51 additions and 4 deletions

View File

@ -111,6 +111,7 @@
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('cron_apps', 'cron_apps', 0, 0, NULL, '".$currentver."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$currentver."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 1, 13, NULL, '".$currentver."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$db->query("insert into groups (group_name) values ('Default')");
$db->query("insert into accounts (account_lid,account_pwd,account_firstname,account_lastname,account_permissions,account_groups,account_status) values ('demo','81dc9bdb52d04dc20036dbd8313ed055','Demo','Account',':admin:email:todo:addressbook:calendar:',',1:0,','A')");

View File

@ -32,4 +32,5 @@
$db->query("DROP TABLE languages");
$db->query("DROP TABLE customers");
$db->query("DROP TABLE categories");
$db->query("DROP TABLE notes");
?>

View File

@ -278,7 +278,17 @@
PRIMARY KEY (lang_id)
)";
$db->query($sql);
$sql = "CREATE TABLE notes (
accountid int(11),
date int(11),
note text,
noteid int(20) auto_increment,
PRIMARY KEY (noteid)
)";
$db->query($sql);
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 0, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$currentver = "0.9.3";
update_version_table();
?>

View File

@ -308,8 +308,21 @@
// The 0.9.3pre1 is only temp until release
if ($currentver == "0.9.3" || ereg ("^0\.9\.4pre", $currentver)){
if ($currentver == "0.9.3") {
$currentver = "0.9.4pre1";
update_version_table();
$currentver = "0.9.4pre1";
update_version_table();
}
if ($currentver == "0.9.4pre1") {
$sql = "CREATE TABLE notes (
accountid int(11),
date int(11),
note text,
noteid int(20) auto_increment,
PRIMARY KEY (noteid)
)";
$db->query($sql);
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$currentver = "0.9.4pre2";
update_version_table();
}
echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td>Upgrade from 0.9.3 to $currentver is completed.</td>\n";

View File

@ -40,4 +40,5 @@
$db->query("DROP TABLE languages");
$db->query("drop sequence categories_cat_id_seq");
$db->query("DROP TABLE categories");
$db->query("DROP TABLE notes");
?>

View File

@ -251,6 +251,14 @@
)";
$db->query($sql);
$sql = "CREATE TABLE notes (
accountid int(11),
date int(11),
note text,
noteid int(20) auto_increment,
PRIMARY KEY (noteid)
)";
$db->query($sql);
$currentver = "0.9.3";
update_version_table();

View File

@ -313,6 +313,19 @@
$currentver = "0.9.4pre1";
update_version_table();
}
if ($currentver == "0.9.4pre1") {
$sql = "CREATE TABLE notes (
accountid int(11),
date int(11),
note text,
noteid int(20) auto_increment,
PRIMARY KEY (noteid)
)";
$db->query($sql);
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 13, NULL, '".$phpgw_info["server"]["version"]."')");
$currentver = "0.9.4pre2";
update_version_table();
}
echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td>Upgrade from 0.9.3 to $currentver is completed.</td>\n";
echo " </tr>\n";

View File

@ -1 +1 @@
<?php $phpgw_info["server"]["version"] = "0.9.4pre1"; ?>
<?php $phpgw_info["server"]["version"] = "0.9.4pre2"; ?>