- spelling fixes from HEAD

I've tested these and have not encountered any issues
This commit is contained in:
mgalgoci 2004-10-15 18:23:49 +00:00
parent 287eb1ada5
commit 7b9ae9942e
4 changed files with 115 additions and 12 deletions

View File

@ -3162,7 +3162,7 @@
$str .= ' ('.implode(', ',$str_extra).')';
}
$var['recure_type'] = Array(
$var['recur_type'] = Array(
'field' => lang('Repetition'),
'data' => $str,
);

View File

@ -0,0 +1,101 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar - Custom fields and sorting *
* http://www.egroupware.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
class bocustom_fields
{
var $stock_fields = array(
'title' => array(
'label' => 'Title',
'title' => True
),
'description' => 'Description',
'category' => 'Category',
'location' => 'Location',
'project' => array(
'label' => 'Project',
'disabled' => true,
),
'startdate' => 'Start Date/Time',
'enddate' => 'End Date/Time',
'priority' => 'Priority',
'access' => 'Access',
'participants'=> 'Participants',
'owner' => 'Created By',
'updated' => 'Updated',
'alarm' => 'Alarm',
'recur_type' => 'Repetition'
);
function bocustom_fields()
{
$this->config = CreateObject('phpgwapi.config','calendar');
$this->config->read_repository();
$this->fields = &$this->config->config_data['fields'];
if (!is_array($this->fields)) {
$this->fields = array();
}
foreach ($this->fields as $field => $data) // this can be removed after a while
{
if (!isset($this->stock_fields[$field]) && $field[0] != '#')
{
unset($this->fields[$field]);
$this->fields['#'.$field] = $data;
}
}
foreach($this->stock_fields as $field => $data)
{
if (!is_array($data))
{
$data = array('label' => $data);
}
if (!isset($this->fields[$field]))
{
$this->fields[$field] = array(
'name' => $field,
'title' => $data['title'],
'disabled' => $data['disabled']
);
}
$this->fields[$field]['label'] = $data['label'];
$this->fields[$field]['length'] = $data['length'];
$this->fields[$field]['shown'] = $data['shown'];
}
}
function set($data)
{
if (is_array($data) && strlen($data['name']) > 0)
{
if (!isset($this->stock_fields[$name = $data['name']]))
{
$name = '#'.$name;
}
$this->fields[$name] = $data;
}
}
function save($fields=False)
{
if ($fields)
{
$this->fields = $fields;
}
//echo "<pre>"; print_r($this->config->config_data); echo "</pre>\n";
$this->config->save_repository();
}
}

View File

@ -3128,6 +3128,9 @@
$recur_enddate['year'] = (int)($ical['event'][$i]['rrule']['until']['year']);
$recur_enddate['month'] = (int)($ical['event'][$i]['rrule']['until']['month']);
$recur_enddate['mday'] = (int)($ical['event'][$i]['rrule']['until']['mday']);
$recur_enddate['hour'] = (int)($ical['event'][$i]['rrule']['until']['hour']);
$recur_enddate['min'] = (int)($ical['event'][$i]['rrule']['until']['min']);
$recur_enddate['sec'] = (int)($ical['event'][$i]['rrule']['until']['sec']);
}
elseif( isset($ical['event'][$i]['duration']) )
{
@ -3206,7 +3209,6 @@
$recur_enddate['min'],
$recur_enddate['sec']
);
}
else
{

View File

@ -4245,7 +4245,7 @@
{
$str .= '<option value="'.$type.'"'.($event['recur_type']==$type?' selected':'').'>'.lang($label).'</option>';
}
$var['recure_type'] = Array(
$var['recur_type'] = Array(
'field' => lang('Repeat Type'),
'data' => '<select name="cal[recur_type]">'."\n".$str.'</select>'."\n"
);
@ -4261,7 +4261,7 @@
$recur_end = $this->bo->maketime($event['start']) + 86400 - $GLOBALS['phpgw']->datetime->tz_offset;
}
$var['recure_enddate'] = Array(
$var['recur_enddate'] = Array(
'field' => lang('Repeat End Date'),
'data' => '<input type="checkbox" name="cal[rpt_use_end]" value="y"'.$checked.'>'.lang('Use End Date').' '.
/*
@ -4280,12 +4280,12 @@
$boxes .= '<input type="checkbox" name="cal[rpt_day][]" value="'.$mask.'"'.($event['recur_data'] & $mask ? ' checked' : '').'>&nbsp;'.lang($name)."\n";
if (++$i == 5) $boxes .= '<br>';
}
$var['recure_day'] = Array(
$var['recur_day'] = Array(
'field' => lang('Repeat Day').'<br>'.lang('(for weekly)'),
'data' => $boxes
);
$var['recure_interval'] = Array(
$var['recur_interval'] = Array(
'field' => lang('Interval'),
'data' => '<input name="cal[recur_interval]" size="4" maxlength="4" value="'.$event['recur_interval'].'">'
);
@ -4319,14 +4319,14 @@
$this->output_template_array($p,'row','list',$var['enddate']);
$this->output_template_array($p,'row','list',$var['endtime']);
break;
case 'recure_type':
case 'recur_type':
$p->set_var('tr_color',$this->theme['th_bg']);
$p->set_var('hr_text','<center><b>'.lang('Repeating Event Information').'</b></center>');
$p->parse('row','hr',True);
$this->output_template_array($p,'row','list',$var['recure_type']);
$this->output_template_array($p,'row','list',$var['recure_enddate']);
$this->output_template_array($p,'row','list',$var['recure_day']);
$this->output_template_array($p,'row','list',$var['recure_interval']);
$this->output_template_array($p,'row','list',$var['recur_type']);
$this->output_template_array($p,'row','list',$var['recur_enddate']);
$this->output_template_array($p,'row','list',$var['recur_day']);
$this->output_template_array($p,'row','list',$var['recur_interval']);
break;
default:
$this->output_template_array($p,'row','list',$var[$field]);
@ -4364,7 +4364,7 @@
case 'owner':
$preserved[$field] = $event['id'] ? $event['participants'][$event['owner']] : 'A';
break;
case 'recure_type':
case 'recur_type':
foreach(array('recur_type','recur_enddate','recur_data','recur_interval') as $field)
{
$preserved[$field] = $event[$field];