[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] todo inc/class.botodo.inc.php setup/phpgw_de.la...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] todo inc/class.botodo.inc.php setup/phpgw_de.la... |
Date: |
Sun, 01 Oct 2006 13:24:14 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: todo
Changes by: Dave Hall <skwashd> 06/10/01 13:24:14
Modified files:
inc : class.botodo.inc.php
setup : phpgw_de.lang phpgw_en.lang
Log message:
notices, globals, formatting, grammar
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/todo/inc/class.botodo.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/todo/setup/phpgw_de.lang?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/todo/setup/phpgw_en.lang?cvsroot=phpgroupware&r1=1.14&r2=1.15
Patches:
Index: inc/class.botodo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.botodo.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- inc/class.botodo.inc.php 10 May 2005 15:48:57 -0000 1.18
+++ inc/class.botodo.inc.php 1 Oct 2006 13:24:14 -0000 1.19
@@ -7,7 +7,7 @@
* @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package todo
- * @version $Id: class.botodo.inc.php,v 1.18 2005/05/10 15:48:57
powerstat Exp $
+ * @version $Id: class.botodo.inc.php,v 1.19 2006/10/01 13:24:14 skwashd
Exp $
*/
/**
@@ -24,6 +24,11 @@
var $sort;
var $cat_id;
+ /**
+ * @var bool $debug enable debugging
+ */
+ var $debug = false;
+
var $public_functions = array
(
'cached_accounts' => True,
@@ -49,12 +54,12 @@
$this->use_session = True;
}
- $_start = $GLOBALS['HTTP_POST_VARS']['start'] ?
$GLOBALS['HTTP_POST_VARS']['start'] : $GLOBALS['HTTP_GET_VARS']['start'];
- $_query = $GLOBALS['HTTP_POST_VARS']['query'] ?
$GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query'];
- $_sort = $GLOBALS['HTTP_POST_VARS']['sort'] ?
$GLOBALS['HTTP_POST_VARS']['sort'] : $GLOBALS['HTTP_GET_VARS']['sort'];
- $_order = $GLOBALS['HTTP_POST_VARS']['order'] ?
$GLOBALS['HTTP_POST_VARS']['order'] : $GLOBALS['HTTP_GET_VARS']['order'];
- $_filter = $GLOBALS['HTTP_POST_VARS']['filter']
? $GLOBALS['HTTP_POST_VARS']['filter'] : $GLOBALS['HTTP_GET_VARS']['filter'];
- $_cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id']
? $GLOBALS['HTTP_POST_VARS']['cat_id'] : $GLOBALS['HTTP_GET_VARS']['cat_id'];
+ $_start = isset($_REQUEST['start']) ?
$_REQUEST['start'] : 0;
+ $_query = isset($_REQUEST['query']) ?
$_REQUEST['query'] : '';
+ $_sort = isset($_REQUEST['sort']) ?
$_REQUEST['sort'] : 'ASC';
+ $_order = isset($_REQUEST['order']) ?
$_REQUEST['order'] : 'todo_id';
+ $_filter = isset($_REQUEST['filter'])?
$_REQUEST['filter'] : '';
+ $_cat_id = isset($_REQUEST['cat_id'])?
$_REQUEST['cat_id'] : 0;
if(!empty($_start) || ($_start == '0') || ($_start ==
0))
{
@@ -71,7 +76,7 @@
{
$this->cat_id = $_cat_id;
}
- if((isset($GLOBALS['HTTP_POST_VARS']['cat_id']) ||
isset($GLOBALS['HTTP_GET_VARS']['cat_id'])) &&
+ if((isset($_POST['cat_id']) || isset($_GET['cat_id']))
&&
($_cat_id == '0' || $_cat_id == 0 || $_cat_id
== ''))
{
$this->cat_id = 0;
@@ -79,19 +84,28 @@
if(isset($_sort) && !empty($_sort))
{
- if($this->debug) { echo '<br>overriding $sort:
"' . $this->sort . '" now "' . $_sort . '"'; }
+ if($this->debug)
+ {
+ echo '<br>overriding $sort: "' .
$this->sort . '" now "' . $_sort . '"';
+ }
$this->sort = $_sort;
}
if(isset($_order) && !empty($_order))
{
- if($this->debug) { echo '<br>overriding $order:
"' . $this->order . '" now "' . $_order . '"'; }
+ if($this->debug)
+ {
+ echo '<br>overriding $order: "' .
$this->order . '" now "' . $_order . '"';
+ }
$this->order = $_order;
}
if(isset($_filter) && !empty($_filter))
{
- if($this->debug) { echo '<br>overriding
$filter: "' . $this->filter . '" now "' . $_filter . '"'; }
+ if($this->debug)
+ {
+ echo '<br>overriding $filter: "' .
$this->filter . '" now "' . $_filter . '"';
+ }
$this->filter = $_filter;
}
}
@@ -239,53 +253,50 @@
$todos = $this->sotodo->read_todos($start, $limit,
$query, $filter, $order, $sort, $cat_id, $tree, $parent);
$this->total_records = $this->sotodo->total_records;
- while (is_array($todos) && list(,$v) = each($todos))
+ $r = array();
+ foreach ( $todos as $todo )
{
- $sdate = $v['sdate'] -
$this->datetime->tz_offset;
- $v['sdate'] =
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+ $sdate = $todo['sdate'] -
$this->datetime->tz_offset;
+ $todo['sdate'] =
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
- if ($v['edate'] && $v['edate'] != 0)
+ if ( isset($todo['edate']) && $todo['edate'] !=
0)
{
- $edate = $v['edate'] -
$this->datetime->tz_offset;
+ $edate = $todo['edate'] -
$this->datetime->tz_offset;
$v['edate'] =
$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
- if ($v['assigned'])
+ if ($todo['assigned'])
{
- $v['assigned'] =
$this->format_assigned($v['assigned']);
+ $todo['assigned'] =
$this->format_assigned($todo['assigned']);
}
- if ($v['assigned_group'])
+ if ($todo['assigned_group'])
{
- $v['assigned_group'] =
$this->format_assigned($v['assigned_group']);
+ $todo['assigned_group'] =
$this->format_assigned($todo['assigned_group']);
}
- $adata = $this->cached_accounts($v['owner']);
-
- $v['owner'] =
$GLOBALS['phpgw']->common->display_fullname($adata[$v['owner']]['lid'],
-
$adata[$v['owner']]['firstname'],$adata[$v['owner']]['lastname']);
-
+ $v['owner'] =
$GLOBALS['phpgw']->accounts->name2id($todo['owner']);
$r[] = array
(
- 'id' =>
(int)$v['id'],
- 'main' =>
(int)$v['main'],
- 'parent' =>
(int)$v['parent'],
- 'level' =>
(int)$v['level'],
- 'owner' =>
$v['owner'],
- 'owner_id' =>
(int)$v['owner_id'],
- 'access' =>
$v['access'],
- 'cat' =>
(int)$v['cat'],
- 'title' =>
$v['title'],
- 'descr' =>
$v['descr'],
- 'pri' =>
(int)$v['pri'],
- 'status' =>
(int)$v['status'],
- 'sdate' =>
$v['sdate'],
- 'edate' =>
$v['edate'],
- 'grants' =>
(int)$v['grants'],
- 'sdate_epoch' =>
(int)$v['sdate_epoch'],
- 'edate_epoch' =>
(int)$v['edate_epoch'],
- 'assigned' =>
$v['assigned'],
- 'assigned_group' =>
$v['assigned_group']
+ 'id' =>
(int) $todo['id'],
+ 'main' =>
(int) $todo['main'],
+ 'parent' =>
(int) $todo['parent'],
+ 'level' =>
(int) $todo['level'],
+ 'owner' =>
$todo['owner'],
+ 'owner_id' =>
(int) $todo['owner_id'],
+ 'access' =>
$todo['access'],
+ 'cat' =>
(int) $todo['cat'],
+ 'title' =>
$todo['title'],
+ 'descr' =>
$todo['descr'],
+ 'pri' =>
(int) $todo['pri'],
+ 'status' =>
(int) $todo['status'],
+ 'sdate' =>
$todo['sdate'],
+ 'edate' =>
$todo['edate'],
+ 'grants' =>
(int) $todo['grants'],
+ 'sdate_epoch' => (int)
$todo['sdate_epoch'],
+ 'edate_epoch' => (int)
$todo['edate_epoch'],
+ 'assigned' =>
$todo['assigned'],
+ 'assigned_group' =>
$todo['assigned_group']
);
}
return $r;
@@ -293,9 +304,7 @@
function read($todo_id)
{
- $todo = $this->sotodo->read_single_todo($todo_id);
-
- return $todo;
+ return $this->sotodo->read_single_todo($todo_id);
}
function check_values($values)
@@ -319,7 +328,7 @@
{
if(!
$this->datetime->date_valid($values['syear'],$values['smonth'],$values['sday']))
{
- $error[] = lang('You have entered an
starting invalid date');
+ $error[] = lang('You have entered an
invalid start date');
}
}
@@ -327,7 +336,7 @@
{
if(!
$this->datetime->date_valid($values['eyear'],$values['emonth'],$values['eday']))
{
- $error[] = lang('You have entered an
ending invalid date');
+ $error[] = lang('You have entered an
invalid end date');
}
}
Index: setup/phpgw_de.lang
===================================================================
RCS file: /cvsroot/phpgroupware/todo/setup/phpgw_de.lang,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- setup/phpgw_de.lang 16 Mar 2002 04:10:19 -0000 1.11
+++ setup/phpgw_de.lang 1 Oct 2006 13:24:14 -0000 1.12
@@ -20,6 +20,6 @@
to do list common de Aufgabenliste
urgency todo de Dringlichkeit
view matrix of actual month todo de Matrix des aktuellen Monats
anzeigen
-You can only enter numbers for days from now todo Sie können nur
Zahlen als Tage ab Startdatum verwenden !
-You have entered an starting invalid date todo de Sie haben ein
ungültiges Startdatum angegeben !
-You have entered an ending invalid date todo de Sie haben ein
ungültiges Enddatum angegeben !
+You can only enter numbers for days from now todo de Sie können
nur Zahlen als Tage ab Startdatum verwenden !
+You have entered an invalid start date todo de Sie haben ein
ungültiges Startdatum angegeben !
+You have entered an invalid end date todo de Sie haben ein
ungültiges Enddatum angegeben !
Index: setup/phpgw_en.lang
===================================================================
RCS file: /cvsroot/phpgroupware/todo/setup/phpgw_en.lang,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- setup/phpgw_en.lang 19 Jun 2003 20:40:48 -0000 1.14
+++ setup/phpgw_en.lang 1 Oct 2006 13:24:14 -0000 1.15
@@ -38,5 +38,5 @@
view matrix of actual month todo en View matrix of actual month
view todo item todo en View todo item
you can only enter numbers for days from now todo en You can only
enter numbers for days from now !
-you have entered an ending invalid date todo en You have
entered an ending invalid date !
-you have entered an starting invalid date todo en You have
entered an starting invalid date !
+you have entered an invalid start date todo en You have entered an
ending invalid date !
+you have entered an invalid end date todo en You have entered an
starting invalid date !
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] todo inc/class.botodo.inc.php setup/phpgw_de.la...,
Dave Hall <=