[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.2,1.3 class.so.inc.
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.2,1.3 class.so.inc.php,1.3,1.4 class.ui.inc.php,1.9,1.10 |
Date: |
Tue, 17 Sep 2002 11:43:04 -0400 |
Update of /cvsroot/phpgroupware/notes/inc
In directory subversions:/tmp/cvs-serv22158/inc
Modified Files:
class.bo.inc.php class.so.inc.php class.ui.inc.php
Log Message:
started porting notes to use etemplates
Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.bo.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bo.inc.php 10 Dec 2001 01:00:27 -0000 1.2
--- class.bo.inc.php 17 Sep 2002 15:43:02 -0000 1.3
***************
*** 20,33 ****
var $cat_id;
! var $public_functions = array(
! '_list' => True,
! 'read' => True,
! 'save' => True,
! 'delete' => True,
! 'check_perms' => True,
! 'set_font' => True,
! 'set_font_size' => True,
! 'read_preferences' => True,
! 'save_preferences' => True
);
--- 20,34 ----
var $cat_id;
! var $public_functions = array
! (
! 'read' => True,
! 'read_single' => True,
! 'save' => True,
! 'delete' => True,
! 'check_perms' => True,
! 'set_font' => True,
! 'set_font_size' => True,
! 'read_preferences' => True,
! 'save_preferences' => True
);
***************
*** 170,174 ****
}
! function _list($start = '', $search = '', $filter = '', $cat_id
= '')
{
if (is_array($start))
--- 171,175 ----
}
! function read($start = '', $search = '', $filter = '', $cat_id
= '')
{
if (is_array($start))
***************
*** 196,203 ****
}
! function read($note_id)
{
! $note = $this->so->read_single_note($note_id);
! return $note;
}
--- 197,203 ----
}
! function read_single($note_id)
{
! return $this->so->read_single($note_id);
}
Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.so.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.so.inc.php 7 May 2002 12:59:48 -0000 1.3
--- class.so.inc.php 17 Sep 2002 15:43:02 -0000 1.4
***************
*** 93,97 ****
}
! function read_single_note($note_id)
{
$this->db->query("select * from phpgw_notes where
note_id='$note_id'",__LINE__,__FILE__);
--- 93,97 ----
}
! function read_single($note_id)
{
$this->db->query("select * from phpgw_notes where
note_id='$note_id'",__LINE__,__FILE__);
***************
*** 99,108 ****
if ($this->db->next_record())
{
! $note['id'] =
(int)$this->db->f('note_id');
! $note['owner'] = $this->db->f('note_owner');
! $note['content'] =
$this->db->f('note_content');
! $note['access'] = $this->db->f('note_access');
! $note['date'] = $this->db->f('note_date');
! $note['category'] =
(int)$this->db->f('note_category');
return $note;
--- 99,108 ----
if ($this->db->next_record())
{
! $note['id'] =
(int)$this->db->f('note_id');
! $note['owner'] =
$this->db->f('note_owner');
! $note['content'] =
$this->db->f('note_content');
! $note['access'] =
$this->db->f('note_access');
! $note['date'] =
$this->db->f('note_date');
! $note['cat'] =
(int)$this->db->f('note_category');
return $note;
Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.ui.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.ui.inc.php 24 May 2002 10:38:02 -0000 1.9
--- class.ui.inc.php 17 Sep 2002 15:43:02 -0000 1.10
***************
*** 21,24 ****
--- 21,26 ----
var $filter;
+ var $message;
+
var $public_functions = array
(
***************
*** 31,48 ****
);
function ui()
{
! $this->cats = CreateObject('phpgwapi.categories');
! $this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->t = $GLOBALS['phpgw']->template;
! $this->grants =
$GLOBALS['phpgw']->acl->get_grants('notes');
$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
! $this->bo = CreateObject('notes.bo',True);
! $this->start = $this->bo->start;
! $this->search = $this->bo->search;
! $this->filter = $this->bo->filter;
! $this->cat_id = $this->bo->cat_id;
}
--- 33,59 ----
);
+ var $messages = array
+ (
+ 'saved' => 'Note has been added for %1
!',
+ 'error_writing' => 'Error: writing !!!'
+ );
+
function ui()
{
! $this->cats =
CreateObject('phpgwapi.categories');
! $this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
! //$this->t =
$GLOBALS['phpgw']->template;
! $this->tpl =
CreateObject('etemplate.etemplate','notes.edit');
! $this->grants =
$GLOBALS['phpgw']->acl->get_grants('notes');
$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
! $this->bo =
CreateObject('notes.bo',True);
!
! $this->start = $this->bo->start;
! $this->search = $this->bo->search;
! $this->filter = $this->bo->filter;
! $this->cat_id = $this->bo->cat_id;
! $this->data = $this->bo->data;
}
***************
*** 280,284 ****
}
! function edit()
{
global $cat_id, $new_cat, $editnote, $note, $note_id;
--- 291,361 ----
}
! function edit($values=0, $msg = '')
! {
! if (is_array($values))
! {
! if ($values['id'] > 0)
! {
! $data = $this->bo->read($values['id']);
! }
!
! if ($this->debug)
! {
! echo '<p>edit: values = ' .
_debug_array($values);
! }
!
! //$this->data_merge($values);
! //echo "<p>edit: data =";
_debug_array($this->data);
!
! switch($values)
! {
! case 'save':
! $this->bo->save();
! $msg .=
$this->messages[!$this->save() ? 'saved' : 'error_writing'];
! break;
! case 'done':
! $this->index();
! break;
! case 'delete':
! $this->delete();
! break;
! }
!
! /*if (isset($values['entry']['edit']))
! {
! list($id) =
each($content['entry']['edit']);
! if ($id > 0)
! {
! $this->read(array('id' => $id));
! }
! }*/
! }
!
! $values = $data;
!
! $select_options = array
! (
! 'cat' => $this->cats
! );
!
! if (is_array($values))
! {
! $no_button = array
! (
! 'reset' => True
! );
! }
! else
! {
! $no_button = array
! (
! 'delete' => True
! );
! }
!
!
$this->tpl->exec('notes.edit',$values,$select_options,$no_button,array('id' =>
$data['id']));
! }
!
! /* function edit()
{
global $cat_id, $new_cat, $editnote, $note, $note_id;
***************
*** 332,336 ****
$this->t->pfp('out','form');
$this->t->pfp('edithandle','edit');
! }
function delete()
--- 409,413 ----
$this->t->pfp('out','form');
$this->t->pfp('edithandle','edit');
! } */
function delete()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.2,1.3 class.so.inc.php,1.3,1.4 class.ui.inc.php,1.9,1.10,
Bettina Gille <address@hidden> <=