From f51ced506bd665dd494e18f0bbbf13035b839890 Mon Sep 17 00:00:00 2001 From: skeeter Date: Fri, 27 Apr 2001 02:47:54 +0000 Subject: [PATCH] Found 'public' is a keyword... Changed to 'is_public'. --- calendar/inc/class.calendar.inc.php | 4 ++-- calendar/inc/class.calendar_sql.inc.php | 8 ++++---- setup/sql/mysql_newtables.inc.php | 2 +- setup/sql/mysql_upgrade_beta.inc.php | 2 +- setup/sql/pgsql_newtables.inc.php | 2 +- setup/sql/pgsql_upgrade_beta.inc.php | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/calendar/inc/class.calendar.inc.php b/calendar/inc/class.calendar.inc.php index b9f56685d3..18d3260b85 100755 --- a/calendar/inc/class.calendar.inc.php +++ b/calendar/inc/class.calendar.inc.php @@ -344,7 +344,7 @@ class calendar extends calendar_ // Private if(strpos($this->filter,'private')) { - $sql .= " AND phpgw_cal.public=0"; + $sql .= " AND phpgw_cal.is_public=0"; } $sql .= ') ORDER BY phpgw_cal.datetime ASC, phpgw_cal.edatetime ASC, phpgw_cal.priority ASC'; @@ -528,7 +528,7 @@ class calendar extends calendar_ // Private if(strpos($this->filter,'private')) { - $sql .= " AND endar_entry.cal.public=0"; + $sql .= " AND phpgw_cal.is_public=0"; } $sql .= ') ORDER BY phpgw_cal.datetime ASC, phpgw_cal.edatetime ASC, phpgw_cal.priority ASC'; diff --git a/calendar/inc/class.calendar_sql.inc.php b/calendar/inc/class.calendar_sql.inc.php index a7eef7f2c5..ff27bcb485 100755 --- a/calendar/inc/class.calendar_sql.inc.php +++ b/calendar/inc/class.calendar_sql.inc.php @@ -120,7 +120,7 @@ class calendar_ extends calendar__ $this->event->owner = $this->stream->f('owner'); $this->event->id = intval($this->stream->f('id')); - $this->event->public = intval($this->stream->f('public')); + $this->event->public = intval($this->stream->f('is_public')); $this->event->category = intval($this->stream->f('category')); $this->event->title = $phpgw->strip_html($this->stream->f('title')); $this->event->description = $phpgw->strip_html($this->stream->f('description')); @@ -601,7 +601,7 @@ class calendar_ extends calendar__ if($event->id == 0) { $temp_name = tempnam($phpgw_info['server']['temp_dir'],'cal'); - $this->stream->query('INSERT INTO phpgw_cal(title,owner,category,priority,public) ' + $this->stream->query('INSERT INTO phpgw_cal(title,owner,category,priority,is_public) ' . "values('".$temp_name."',".$event->owner.",'".$category."',".$event->priority.",".$event->public.")"); $this->stream->query("SELECT id FROM phpgw_cal WHERE title='".$temp_name."'"); $this->stream->next_record(); @@ -629,7 +629,7 @@ class calendar_ extends calendar__ . 'edatetime='.$enddate.', ' . 'priority='.$event->priority.', ' . "type='".$type."', " - . 'public='.$event->access.', ' + . 'is_public='.$event->access.', ' . "title='".addslashes($event->name)."', " . "description='".addslashes($event->description)."' " . 'WHERE id='.$event->id; @@ -724,7 +724,7 @@ class calendar_ extends calendar__ } else { - return "(phpgw_cal.public=2 AND (". $groups .')) '; + return "(phpgw_cal.is_public=2 AND (". $groups .')) '; } } diff --git a/setup/sql/mysql_newtables.inc.php b/setup/sql/mysql_newtables.inc.php index 717fa39784..b5851ab9a0 100644 --- a/setup/sql/mysql_newtables.inc.php +++ b/setup/sql/mysql_newtables.inc.php @@ -220,7 +220,7 @@ edatetime int(11), priority int(11) DEFAULT '2' NOT NULL, type varchar(10), - public int DEFAULT '1' NOT NULL, + is_public int DEFAULT '1' NOT NULL, title varchar(80) NOT NULL, description text, PRIMARY KEY (id) diff --git a/setup/sql/mysql_upgrade_beta.inc.php b/setup/sql/mysql_upgrade_beta.inc.php index 7584872e60..304a2798f1 100644 --- a/setup/sql/mysql_upgrade_beta.inc.php +++ b/setup/sql/mysql_upgrade_beta.inc.php @@ -1516,7 +1516,7 @@ $phpgw_setup->db->query("alter table calendar_entry change cal_edatetime edatetime int(11) DEFAULT '0' NOT NULL",__LINE__,__FILE__); $phpgw_setup->db->query("alter table calendar_entry change cal_priority priority int(11) DEFAULT '2' NOT NULL",__LINE__,__FILE__); $phpgw_setup->db->query("alter table calendar_entry change cal_type type varchar(10)",__LINE__,__FILE__); - $phpgw_setup->db->query("alter table calendar_entry change cal_access public int DEFAULT '1' NOT NULL",__LINE__,__FILE__); + $phpgw_setup->db->query("alter table calendar_entry change cal_access is_public int DEFAULT '1' NOT NULL",__LINE__,__FILE__); $phpgw_setup->db->query("alter table calendar_entry change cal_name title varchar(80) NOT NULL",__LINE__,__FILE__); $phpgw_setup->db->query("alter table calendar_entry change cal_description description text",__LINE__,__FILE__); $phpgw_setup->db->query("alter table calendar_entry rename phpgw_cal",__LINE__,__FILE__); diff --git a/setup/sql/pgsql_newtables.inc.php b/setup/sql/pgsql_newtables.inc.php index 9db5634e40..24faf7aaaf 100644 --- a/setup/sql/pgsql_newtables.inc.php +++ b/setup/sql/pgsql_newtables.inc.php @@ -195,7 +195,7 @@ edatetime int4, priority int DEFAULT 2 NOT NULL, type varchar(10), - public int DEFAULT 1 NOT NULL, + is_public int DEFAULT 1 NOT NULL, title varchar(80) NOT NULL, desription text )"; diff --git a/setup/sql/pgsql_upgrade_beta.inc.php b/setup/sql/pgsql_upgrade_beta.inc.php index 268989ab66..e140863d0d 100644 --- a/setup/sql/pgsql_upgrade_beta.inc.php +++ b/setup/sql/pgsql_upgrade_beta.inc.php @@ -1906,7 +1906,7 @@ edatetime int4, priority int DEFAULT 2 NOT NULL, type varchar(10), - public int DEFAULT 1 NOT NULL, + is_public int DEFAULT 1 NOT NULL, title varchar(80) NOT NULL, desription text )"; @@ -1930,7 +1930,7 @@ $public = $phpgw_setup->db->f('cal_access'); $title = $phpgw_setup->db->f('cal_name'); $description = $phpgw_setup->db->f('cal_description'); - $temp_db->query("INSERT INTO phpgw_cal(id,owner,category,groups,datetime,mdatetime,edatetime,priority,type,public,title,description) + $temp_db->query("INSERT INTO phpgw_cal(id,owner,category,groups,datetime,mdatetime,edatetime,priority,type,is_public,title,description) values($id,$owner,0,'$groups',$datetime,$mdatetime,$edatetime,$priority,'$type',$public,'$title','$description')",__LINE__,__FILE__); }