mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-24 14:11:29 +01: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 lang independence with navbar text.
|
||||
- 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
|
||||
- You can now turn off cacheing of the phpgw_info array, maybe a small preformance increase
|
||||
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 .= "values (".$accountid.", '".$accountname."', '".md5($passwd)."', '".$accountname."', 'AutoCreated', ".time().", 'A','u')";
|
||||
$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('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__);
|
||||
|
@ -141,7 +141,7 @@
|
||||
$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')";
|
||||
$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('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__);
|
||||
|
@ -48,8 +48,8 @@
|
||||
|
||||
function read_repository()
|
||||
{
|
||||
$this->db->lock("preferences");
|
||||
$this->db->query("SELECT preference_value FROM preferences WHERE preference_owner='".$this->account_id."'",__LINE__,__FILE__);
|
||||
$this->db->lock("phpgw_preferences");
|
||||
$this->db->query("SELECT preference_value FROM phpgw_preferences WHERE preference_owner='".$this->account_id."'",__LINE__,__FILE__);
|
||||
$this->db->next_record();
|
||||
$pref_info = $this->db->f("preference_value");
|
||||
$this->data = Array();
|
||||
@ -97,8 +97,8 @@
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
if (! $phpgw->acl->check("session_only_preferences",1,"preferences")) {
|
||||
$this->db->lock("preferences");
|
||||
$this->db->query("delete from preferences where preference_owner='" . $this->account_id . "'",__LINE__,__FILE__);
|
||||
$this->db->lock("phpgw_preferences");
|
||||
$this->db->query("delete from phpgw_preferences where preference_owner='" . $this->account_id . "'",__LINE__,__FILE__);
|
||||
|
||||
if ($PHP_VERSION < "4.0.0") {
|
||||
$pref_info = addslashes(serialize($this->data));
|
||||
@ -106,7 +106,7 @@
|
||||
$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->db->unlock();
|
||||
|
@ -53,12 +53,6 @@
|
||||
)";
|
||||
$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 (
|
||||
session_id varchar(255) NOT NULL,
|
||||
session_lid varchar(255),
|
||||
@ -298,8 +292,8 @@
|
||||
);";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre10';
|
||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||
update_version_table();
|
||||
// $phpgw_setup->update_version_table();
|
||||
?>
|
||||
|
@ -990,6 +990,17 @@
|
||||
$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);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -46,12 +46,6 @@
|
||||
)";
|
||||
$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 (
|
||||
preference_owner int,
|
||||
preference_value text
|
||||
@ -271,7 +265,7 @@
|
||||
);";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre10';
|
||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||
update_version_table();
|
||||
?>
|
@ -1055,6 +1055,16 @@
|
||||
$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);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -11,5 +11,5 @@
|
||||
|
||||
/* $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";
|
||||
|
Loading…
Reference in New Issue
Block a user