mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
Changed the preferences table to use the phpgw_ prefix
This commit is contained in:
parent
08f8976bfe
commit
f3e93891a9
@ -7,7 +7,7 @@
|
|||||||
- Fixed calendar when editing events and groups associated to them.
|
- Fixed calendar when editing events and groups associated to them.
|
||||||
- Fixed lang independence with navbar text.
|
- Fixed lang independence with navbar text.
|
||||||
- Implemented new Applications class.
|
- Implemented new Applications class.
|
||||||
- Changed a few table names to use the phpgw_ prefix.
|
- Changed all API table names to use the phpgw_ prefix.
|
||||||
- Application permissions on accounts is now done via full ACL
|
- Application permissions on accounts is now done via full ACL
|
||||||
- You can now turn off cacheing of the phpgw_info array, maybe a small preformance increase
|
- You can now turn off cacheing of the phpgw_info array, maybe a small preformance increase
|
||||||
depending on the setup.
|
depending on the setup.
|
||||||
|
@ -198,7 +198,7 @@
|
|||||||
$sql .= "(account_id, account_lid, account_pwd, account_firstname, account_lastname, account_lastpwd_change, account_status, account_type)";
|
$sql .= "(account_id, account_lid, account_pwd, account_firstname, account_lastname, account_lastpwd_change, account_status, account_type)";
|
||||||
$sql .= "values (".$accountid.", '".$accountname."', '".md5($passwd)."', '".$accountname."', 'AutoCreated', ".time().", 'A','u')";
|
$sql .= "values (".$accountid.", '".$accountname."', '".md5($passwd)."', '".$accountname."', 'AutoCreated', ".time().", 'A','u')";
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
$this->db->query("insert into preferences (preference_owner, preference_value) values ('".$accountid."', '$defaultprefs')");
|
$this->db->query("insert into phpgw_preferences (preference_owner, preference_value) values ('".$accountid."', '$defaultprefs')");
|
||||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)values('preferences', 'changepassword', ".$accountid.", 'u', 0)",__LINE__,__FILE__);
|
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)values('preferences', 'changepassword', ".$accountid.", 'u', 0)",__LINE__,__FILE__);
|
||||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights) values('phpgw_group', '1', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights) values('phpgw_group', '1', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights) values('addressbook', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights) values('addressbook', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
$sql .= "(account_id, account_lid, account_type, account_pwd, account_firstname, account_lastname, account_lastpwd_change, account_status)";
|
$sql .= "(account_id, account_lid, account_type, account_pwd, account_firstname, account_lastname, account_lastpwd_change, account_status)";
|
||||||
$sql .= "values (".$accountid.", '".$accountname."','u', '".md5($passwd)."', '".$accountname."', 'AutoCreated', ".time().", 'A')";
|
$sql .= "values (".$accountid.", '".$accountname."','u', '".md5($passwd)."', '".$accountname."', 'AutoCreated', ".time().", 'A')";
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
$this->db->query("insert into preferences (preference_owner, preference_value) values ('".$accountid."', '$default_prefs')");
|
$this->db->query("insert into phpgw_preferences (preference_owner, preference_value) values ('".$accountid."', '$default_prefs')");
|
||||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights)values('preferences', 'changepassword', ".$accountid.", 'u', 0)",__LINE__,__FILE__);
|
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights)values('preferences', 'changepassword', ".$accountid.", 'u', 0)",__LINE__,__FILE__);
|
||||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('phpgw_group', '1', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('phpgw_group', '1', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('addressbook', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('addressbook', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
function read_repository()
|
function read_repository()
|
||||||
{
|
{
|
||||||
$this->db->lock("preferences");
|
$this->db->lock("phpgw_preferences");
|
||||||
$this->db->query("SELECT preference_value FROM preferences WHERE preference_owner='".$this->account_id."'",__LINE__,__FILE__);
|
$this->db->query("SELECT preference_value FROM phpgw_preferences WHERE preference_owner='".$this->account_id."'",__LINE__,__FILE__);
|
||||||
$this->db->next_record();
|
$this->db->next_record();
|
||||||
$pref_info = $this->db->f("preference_value");
|
$pref_info = $this->db->f("preference_value");
|
||||||
$this->data = Array();
|
$this->data = Array();
|
||||||
@ -97,8 +97,8 @@
|
|||||||
global $phpgw, $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
|
|
||||||
if (! $phpgw->acl->check("session_only_preferences",1,"preferences")) {
|
if (! $phpgw->acl->check("session_only_preferences",1,"preferences")) {
|
||||||
$this->db->lock("preferences");
|
$this->db->lock("phpgw_preferences");
|
||||||
$this->db->query("delete from preferences where preference_owner='" . $this->account_id . "'",__LINE__,__FILE__);
|
$this->db->query("delete from phpgw_preferences where preference_owner='" . $this->account_id . "'",__LINE__,__FILE__);
|
||||||
|
|
||||||
if ($PHP_VERSION < "4.0.0") {
|
if ($PHP_VERSION < "4.0.0") {
|
||||||
$pref_info = addslashes(serialize($this->data));
|
$pref_info = addslashes(serialize($this->data));
|
||||||
@ -106,7 +106,7 @@
|
|||||||
$pref_info = serialize($this->data);
|
$pref_info = serialize($this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->query("insert into preferences (preference_owner,preference_value) values ('"
|
$this->db->query("insert into phpgw_preferences (preference_owner,preference_value) values ('"
|
||||||
. $this->account_id . "','" . $pref_info . "')",__LINE__,__FILE__);
|
. $this->account_id . "','" . $pref_info . "')",__LINE__,__FILE__);
|
||||||
|
|
||||||
$this->db->unlock();
|
$this->db->unlock();
|
||||||
|
@ -53,12 +53,6 @@
|
|||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$sql = "CREATE TABLE preferences (
|
|
||||||
preference_owner int,
|
|
||||||
preference_value text
|
|
||||||
)";
|
|
||||||
$phpgw_setup->db->query($sql);
|
|
||||||
|
|
||||||
$sql = "CREATE TABLE phpgw_sessions (
|
$sql = "CREATE TABLE phpgw_sessions (
|
||||||
session_id varchar(255) NOT NULL,
|
session_id varchar(255) NOT NULL,
|
||||||
session_lid varchar(255),
|
session_lid varchar(255),
|
||||||
@ -298,8 +292,8 @@
|
|||||||
);";
|
);";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre10';
|
||||||
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
// $phpgw_setup->update_version_table();
|
// $phpgw_setup->update_version_table();
|
||||||
?>
|
?>
|
||||||
|
@ -990,6 +990,17 @@
|
|||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = '0.9.10pre9';
|
||||||
|
function upgrade0_9_10pre9()
|
||||||
|
{
|
||||||
|
global $phpgw_info, $phpgw_setup;
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("alter table preferences rename phpgw_preferences",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre10';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
@ -46,12 +46,6 @@
|
|||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$sql = "create table preferences (
|
|
||||||
preference_owner int,
|
|
||||||
preference_value text
|
|
||||||
)";
|
|
||||||
$phpgw_setup->db->query($sql);
|
|
||||||
|
|
||||||
$sql = "create table phpgw_preferences (
|
$sql = "create table phpgw_preferences (
|
||||||
preference_owner int,
|
preference_owner int,
|
||||||
preference_value text
|
preference_value text
|
||||||
@ -271,7 +265,7 @@
|
|||||||
);";
|
);";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre10';
|
||||||
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
?>
|
?>
|
@ -1055,6 +1055,16 @@
|
|||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = '0.9.10pre9';
|
||||||
|
function upgrade0_9_10pre9()
|
||||||
|
{
|
||||||
|
global $phpgw_info, $phpgw_setup;
|
||||||
|
|
||||||
|
$phpgw_setup->db->query('alter table preferences rename phpgw_preferences',__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre10';
|
||||||
|
}
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre9";
|
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre10";
|
||||||
$phpgw_info["server"]["versions"]["current_header"] = "1.11";
|
$phpgw_info["server"]["versions"]["current_header"] = "1.11";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user