phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.7,1.8 class.so.inc.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.7,1.8 class.so.inc.php,1.6,1.7 class.ui.inc.php,1.19,1.20
Date: Sun, 22 Sep 2002 19:04:14 -0400

Update of /cvsroot/phpgroupware/notes/inc
In directory subversions:/tmp/cvs-serv28176/inc

Modified Files:
        class.bo.inc.php class.so.inc.php class.ui.inc.php 
Log Message:
update

Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.bo.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.bo.inc.php    21 Sep 2002 22:01:33 -0000      1.7
--- class.bo.inc.php    22 Sep 2002 23:04:12 -0000      1.8
***************
*** 213,220 ****
                        }
  
!                       if ($note['id'])
                        {
!                               if ($note['id'] != 0)
                                {
                                        $this->so->edit($note);
                                }
--- 213,221 ----
                        }
  
!                       if ($note['note_id'])
                        {
!                               if ($note['note_id'] != 0)
                                {
+                                       $note_id = $note['note_id'];
                                        $this->so->edit($note);
                                }
***************
*** 222,227 ****
                        else
                        {
!                               $this->so->add($note);
                        }
                }
  
--- 223,229 ----
                        else
                        {
!                               $note_id = $this->so->add($note);
                        }
+                       return $note_id;
                }
  

Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.so.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.so.inc.php    17 Sep 2002 22:09:41 -0000      1.6
--- class.so.inc.php    22 Sep 2002 23:04:12 -0000      1.7
***************
*** 82,86 ****
                                $notes[] = array
                                (
!                                       'id'            => 
(int)$this->db->f('note_id'),
                                        'owner'         => 
$this->db->f('note_owner'),
                                        'owner_id'      => 
(int)$this->db->f('note_owner'),
--- 82,86 ----
                                $notes[] = array
                                (
!                                       'note_id'       => 
(int)$this->db->f('note_id'),
                                        'owner'         => 
$this->db->f('note_owner'),
                                        'owner_id'      => 
(int)$this->db->f('note_owner'),
***************
*** 119,123 ****
                                . "VALUES ('" . $this->owner . "','" . 
$note['access'] . "','" . time() . "','" . $note['content']
                                . "','" . $note['cat'] . 
"')",__LINE__,__FILE__);
!                       //return 
$this->db->get_last_insert_id('phpgw_notes','note_id');
                }
  
--- 119,123 ----
                                . "VALUES ('" . $this->owner . "','" . 
$note['access'] . "','" . time() . "','" . $note['content']
                                . "','" . $note['cat'] . 
"')",__LINE__,__FILE__);
!                       return 
$this->db->get_last_insert_id('phpgw_notes','note_id');
                }
  
***************
*** 127,131 ****
  
                        $this->db->query("UPDATE phpgw_notes set 
note_content='" . $note['content'] . "', note_date='" . time() . "', 
note_category='"
!                                                       . $note['cat'] . "', 
note_access='" . $note['access'] . "' WHERE note_id=" . 
intval($note['id']),__LINE__,__FILE__);
                }
  
--- 127,131 ----
  
                        $this->db->query("UPDATE phpgw_notes set 
note_content='" . $note['content'] . "', note_date='" . time() . "', 
note_category='"
!                                                       . $note['cat'] . "', 
note_access='" . $note['access'] . "' WHERE note_id=" . 
intval($note['note_id']),__LINE__,__FILE__);
                }
  

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.ui.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** class.ui.inc.php    22 Sep 2002 20:46:03 -0000      1.19
--- class.ui.inc.php    22 Sep 2002 23:04:12 -0000      1.20
***************
*** 301,311 ****
                                $content[] = array
                                (
!                                       'id'                    => $note['id'],
                                        'first'                 => $first,
                                        'date'                  => 
$note['date'],
                                        'owner'                 => 
$note['owner'],
!                                       'link_view'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.view&note_id=' . 
$note['id']),
!                                       'link_edit'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.edit&note_id=' . 
$note['id']),
!                                       'link_delete'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.delete&note_id=' . 
$note['id']),
                                        'text_view'             => lang('view'),
                                        'text_edit'             => lang('edit'),
--- 301,311 ----
                                $content[] = array
                                (
!                                       'note_id'               => 
$note['note_id'],
                                        'first'                 => $first,
                                        'date'                  => 
$note['date'],
                                        'owner'                 => 
$note['owner'],
!                                       'link_view'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.view&note_id=' . 
$note['note_id']),
!                                       'link_edit'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.edit&note_id=' . 
$note['note_id']),
!                                       'link_delete'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.delete&note_id=' . 
$note['note_id']),
                                        'text_view'             => lang('view'),
                                        'text_edit'             => lang('edit'),
***************
*** 321,325 ****
                                'lang_edit'             => lang('edit'),
                                'lang_delete'   => lang('delete'),
!                               'lang_id'               => lang('id'),
                                'lang_owner'    => lang('owner')
                        );
--- 321,325 ----
                                'lang_edit'             => lang('edit'),
                                'lang_delete'   => lang('delete'),
!                               'lang_note_id'  => lang('note id'),
                                'lang_owner'    => lang('owner')
                        );
***************
*** 402,406 ****
                }
  
!               function edit($values=0)
                {
                        if (!is_array($values))
--- 402,406 ----
                }
  
!       /*      function edit($values=0)
                {
                        if (!is_array($values))
***************
*** 461,469 ****
                        $data = $values + array('header' => $header);
                        
$this->tpl->exec('notes.ui.edit',$data,'',$no_button,array('id' => 
$values['id']));
                }
  
!       /*      function edit()
                {
!                       global $cat_id, $new_cat, $editnote, $note, $note_id;
  
                        $this->display_app_header();
--- 461,516 ----
                        $data = $values + array('header' => $header);
                        
$this->tpl->exec('notes.ui.edit',$data,'',$no_button,array('id' => 
$values['id']));
+               } */
+ 
+               function edit()
+               {
+                       $note_id        = 
get_var('note_id',array('POST','GET'));
+                       $values         = get_var('values',array('POST'));
+ 
+                       $this->display_app_header();
+ 
+                       $this->tpl->add_file('form');
+ 
+                       if ($values['save'])
+                       {
+                               //$values['category'] = $cat_id;
+                               $values['note_id'] = $note_id;
+ 
+                               $note_id = $this->bo->save($values);
+                               $this->tpl->set_var('message',lang('Note has 
been saved'));
+                       }
+ 
+                       if ($note_id)
+                       {
+                               $note = $this->bo->read_single($note_id);
+                               $this->tpl->set_var('app_header',lang('edit 
note'));
+                       }
+                       else
+                       {
+                               $this->tpl->set_var('app_header',lang('add 
note'));
+                       }
+ 
+                       $data[] = array
+                       (
+                               'form_action'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.edit&note_id=' . 
$note_id),
+                               'done_action'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.index'),
+                               'lang_content'  => lang('content'),
+                               'lang_access'   => lang('privat'),
+                               'lang_save'             => lang('save'),
+                               'lang_done'             => lang('done'),
+                               'value_content' => 
$GLOBALS['phpgw']->strip_html($note['content']),
+                               'value_acces'   => $note['access']
+                       );
+ 
+                       $this->tpl->set_var('form_data',$data);
+ 
+                       $this->tpl->pparse();
                }
  
! 
!               function edit_old()
                {
!                       $note_id        = 
get_var('note_id',array('POST','GET'));
!                       $values         = get_var('values',array('POST','GET'));
  
                        $this->display_app_header();
***************
*** 515,519 ****
                        $this->t->pfp('out','form');
                        $this->t->pfp('edithandle','edit');
!               } */
  
                function delete($values=0)
--- 562,567 ----
                        $this->t->pfp('out','form');
                        $this->t->pfp('edithandle','edit');
!               }
! 
  
                function delete($values=0)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]