[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [19081] fix notices, fix the display of users, fix (p
From: |
Caeies |
Subject: |
[Phpgroupware-cvs] [19081] fix notices, fix the display of users, fix (partially) the values passed, fix the selected things for select box |
Date: |
Wed, 18 Feb 2009 18:25:14 +0000 |
Revision: 19081
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19081
Author: Caeies
Date: 2009-02-18 18:25:14 +0000 (Wed, 18 Feb 2009)
Log Message:
-----------
fix notices, fix the display of users, fix (partially) the values passed, fix
the selected things for select box
Modified Paths:
--------------
core/trunk/todo/inc/class.botodo.inc.php
core/trunk/todo/inc/class.uitodo.inc.php
Modified: core/trunk/todo/inc/class.botodo.inc.php
===================================================================
--- core/trunk/todo/inc/class.botodo.inc.php 2009-02-18 18:23:40 UTC (rev
19080)
+++ core/trunk/todo/inc/class.botodo.inc.php 2009-02-18 18:25:14 UTC (rev
19081)
@@ -220,7 +220,7 @@
function cached_accounts($account_id)
{
- return
$GLOBALS['phpgw']->accounts->get_account_data($account_id);
+ return array($account_id =>
$GLOBALS['phpgw']->accounts->get($account_id));
}
function employee_list($type)
@@ -247,18 +247,7 @@
foreach ( $assi as $a )
{
$adata = $this->cached_accounts($a);
-
- if ($adata[$a]['type'] == 'u')
- {
- $aout .=
$GLOBALS['phpgw']->common->display_fullname(
- $adata[$a]['lid'],
- $adata[$a]['firstname'],
- $adata[$a]['lastname'])
. '<br>';
- }
- elseif($adata[$a]['type'] == 'g')
- {
- $aout .=
$adata[$a]['firstname'] . ' ' . lang('Group') . '<br>';
- }
+ $aout .= (string)$adata[$a] . '<br />';
}
}
@@ -361,7 +350,7 @@
$error[] = lang('Description can not exceed
8000 characters in length');
}
- if ($values['daysfromstart'] && ! ereg('^[0-9]+$',
$values['daysfromstart']))
+ if (isset($values['daysfromstart']) &&
$values['daysfromstart'] && ! ereg('^[0-9]+$', $values['daysfromstart']))
{
$error[] = lang('You can only enter numbers for
days from now');
}
@@ -408,7 +397,7 @@
function save($values)
{
- if ($values['access'])
+ if (isset($values['access']) && $values['access'])
{
$values['access'] = 'private';
}
Modified: core/trunk/todo/inc/class.uitodo.inc.php
===================================================================
--- core/trunk/todo/inc/class.uitodo.inc.php 2009-02-18 18:23:40 UTC (rev
19080)
+++ core/trunk/todo/inc/class.uitodo.inc.php 2009-02-18 18:25:14 UTC (rev
19081)
@@ -293,7 +293,7 @@
'title' => $title,
'datecreated' =>
$todo_list[$i]['sdate'],
'datedue' => $datedueout,
- 'owner' =>
$todo_list[$i]['owner'],
+ 'owner' =>
(string)$GLOBALS['phpgw']->accounts->get($todo_list[$i]['owner']),
'assigned' => $assigned
));
@@ -442,7 +442,7 @@
$values = isset($_POST['values']) ? (array)
$_POST['values'] : array();
$submit = isset($_POST['submit']) ? !!$_POST['submit']
: false;
$new_parent = isset($_POST['new_parent']) ?
$_POST['new_parent'] : 0;
- $parent = isset($_POST['parent']) ? (int)
$_POST['parent'] : 0;
+ $parent = phpgw::get_var('parent', 'int');
$assigned = isset($_POST['assigned']) ?
$_POST['assigned'] : 0;
$assigned_group = isset($_POST['assigned_group']) ?
$_POST['assigned_group'] : 0;
@@ -575,7 +575,7 @@
phpgwapi_sbox::getMonthText('values[emonth]',$values['emonth']),phpgwapi_sbox::getDays('values[eday]',$values['eday'])),
'selfortoday' => '<input
type="checkbox" name="values[seltoday]" value="True">',
'daysfromstartdate' => '<input type="text"
name="values[daysfromstart]" size="3" maxlength="3">',
- 'access_list' => '<input
type="checkbox" name="values[access]" value="True"' .
(!isset($values['access']) || $values['access'] == 'private' ? ' checked' : '')
. '>'
+ 'access_list' => '<input
type="checkbox" name="values[access]" value="True"' .
((!isset($values['access']) || $values['access'] == 'private') ? ' checked' :
'') . '>'
));
$this->t->pfp('out','todo_add');
@@ -623,8 +623,7 @@
$this->t->set_var('assigned',$assigned);
$cached_data =
$this->botodo->cached_accounts($values['owner']);
-
$this->t->set_var('owner',$GLOBALS['phpgw']->common->display_fullname($cached_data[$values['owner']]['lid'],
-
$cached_data[$values['owner']]['firstname'],$cached_data[$values['owner']]['lastname']));
+ $this->t->set_var('owner', (string)
$cached_data[$values['owner']]);
switch ($values['pri'])
{
@@ -659,7 +658,7 @@
$values = isset($_POST['values']) ? (array)
$_POST['values'] : array();
$submit = isset($_POST['submit']) ? !!$_POST['submit']
: false;
$new_parent = isset($_POST['new_parent']) ?
$_POST['new_parent'] : 0;
- $parent = isset($_POST['parent']) ? (int)
$_POST['parent'] : 0;
+ $parent = phpgw::get_var('parent', 'int');
$assigned = isset($_POST['assigned']) ?
$_POST['assigned'] : 0;
$assigned_group = isset($_POST['assigned_group']) ?
$_POST['assigned_group'] : 0;
@@ -781,7 +780,7 @@
$this->t->set_var('lang_daysfromstartdate',' ');
$this->t->set_var('daysfromstartdate',' ');
- $this->t->set_var('access_list', '<input
type="checkbox" name="values[access]" value="True"' . ($values['access'] ==
'private'?' checked':'') . '>');
+ $this->t->set_var('access_list', '<input
type="checkbox" name="values[access]" value="True"' .
((!isset($values['access']) || $values['access'] == 'private')?' checked':'') .
'>');
if
($this->botodo->check_perms($this->grants[$values['owner']],PHPGW_ACL_DELETE)
|| $values['owner'] == $GLOBALS['phpgw_info']['user']['account_id'])
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [19081] fix notices, fix the display of users, fix (partially) the values passed, fix the selected things for select box,
Caeies <=