Found 'public' is a keyword... Changed to 'is_public'.

This commit is contained in:
skeeter 2001-04-27 02:47:54 +00:00
parent 6c83a9a0c9
commit f51ced506b
6 changed files with 11 additions and 11 deletions

View File

@ -344,7 +344,7 @@ class calendar extends calendar_
// Private // Private
if(strpos($this->filter,'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'; $sql .= ') ORDER BY phpgw_cal.datetime ASC, phpgw_cal.edatetime ASC, phpgw_cal.priority ASC';
@ -528,7 +528,7 @@ class calendar extends calendar_
// Private // Private
if(strpos($this->filter,'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'; $sql .= ') ORDER BY phpgw_cal.datetime ASC, phpgw_cal.edatetime ASC, phpgw_cal.priority ASC';

View File

@ -120,7 +120,7 @@ class calendar_ extends calendar__
$this->event->owner = $this->stream->f('owner'); $this->event->owner = $this->stream->f('owner');
$this->event->id = intval($this->stream->f('id')); $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->category = intval($this->stream->f('category'));
$this->event->title = $phpgw->strip_html($this->stream->f('title')); $this->event->title = $phpgw->strip_html($this->stream->f('title'));
$this->event->description = $phpgw->strip_html($this->stream->f('description')); $this->event->description = $phpgw->strip_html($this->stream->f('description'));
@ -601,7 +601,7 @@ class calendar_ extends calendar__
if($event->id == 0) if($event->id == 0)
{ {
$temp_name = tempnam($phpgw_info['server']['temp_dir'],'cal'); $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.")"); . "values('".$temp_name."',".$event->owner.",'".$category."',".$event->priority.",".$event->public.")");
$this->stream->query("SELECT id FROM phpgw_cal WHERE title='".$temp_name."'"); $this->stream->query("SELECT id FROM phpgw_cal WHERE title='".$temp_name."'");
$this->stream->next_record(); $this->stream->next_record();
@ -629,7 +629,7 @@ class calendar_ extends calendar__
. 'edatetime='.$enddate.', ' . 'edatetime='.$enddate.', '
. 'priority='.$event->priority.', ' . 'priority='.$event->priority.', '
. "type='".$type."', " . "type='".$type."', "
. 'public='.$event->access.', ' . 'is_public='.$event->access.', '
. "title='".addslashes($event->name)."', " . "title='".addslashes($event->name)."', "
. "description='".addslashes($event->description)."' " . "description='".addslashes($event->description)."' "
. 'WHERE id='.$event->id; . 'WHERE id='.$event->id;
@ -724,7 +724,7 @@ class calendar_ extends calendar__
} }
else else
{ {
return "(phpgw_cal.public=2 AND (". $groups .')) '; return "(phpgw_cal.is_public=2 AND (". $groups .')) ';
} }
} }

View File

@ -220,7 +220,7 @@
edatetime int(11), edatetime int(11),
priority int(11) DEFAULT '2' NOT NULL, priority int(11) DEFAULT '2' NOT NULL,
type varchar(10), type varchar(10),
public int DEFAULT '1' NOT NULL, is_public int DEFAULT '1' NOT NULL,
title varchar(80) NOT NULL, title varchar(80) NOT NULL,
description text, description text,
PRIMARY KEY (id) PRIMARY KEY (id)

View File

@ -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_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_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_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_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 change cal_description description text",__LINE__,__FILE__);
$phpgw_setup->db->query("alter table calendar_entry rename phpgw_cal",__LINE__,__FILE__); $phpgw_setup->db->query("alter table calendar_entry rename phpgw_cal",__LINE__,__FILE__);

View File

@ -195,7 +195,7 @@
edatetime int4, edatetime int4,
priority int DEFAULT 2 NOT NULL, priority int DEFAULT 2 NOT NULL,
type varchar(10), type varchar(10),
public int DEFAULT 1 NOT NULL, is_public int DEFAULT 1 NOT NULL,
title varchar(80) NOT NULL, title varchar(80) NOT NULL,
desription text desription text
)"; )";

View File

@ -1906,7 +1906,7 @@
edatetime int4, edatetime int4,
priority int DEFAULT 2 NOT NULL, priority int DEFAULT 2 NOT NULL,
type varchar(10), type varchar(10),
public int DEFAULT 1 NOT NULL, is_public int DEFAULT 1 NOT NULL,
title varchar(80) NOT NULL, title varchar(80) NOT NULL,
desription text desription text
)"; )";
@ -1930,7 +1930,7 @@
$public = $phpgw_setup->db->f('cal_access'); $public = $phpgw_setup->db->f('cal_access');
$title = $phpgw_setup->db->f('cal_name'); $title = $phpgw_setup->db->f('cal_name');
$description = $phpgw_setup->db->f('cal_description'); $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__); values($id,$owner,0,'$groups',$datetime,$mdatetime,$edatetime,$priority,'$type',$public,'$title','$description')",__LINE__,__FILE__);
} }