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.9,1.10 class.so.inc


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.9,1.10 class.so.inc.php,1.9,1.10 class.ui.inc.php,1.29,1.30 hook_preferences.inc.php,1.21,1.22 hook_add_def_pref.inc.php,1.1,NONE
Date: Thu, 26 Sep 2002 22:26:05 -0400

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

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

Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.bo.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.bo.inc.php    26 Sep 2002 01:49:45 -0000      1.9
--- class.bo.inc.php    27 Sep 2002 02:26:02 -0000      1.10
***************
*** 3,8 ****
        * phpGroupWare - Notes                                                  
    *
        * http://www.phpgroupware.org                                           
    *
!       * Written by : Andy Holman (LoCdOg)                                     
    *
!       *              Bettina Gille address@hidden                         *
        * -------------------------------------------------                     
    *
        * This program is free software; you can redistribute it and/or modify 
it   *
--- 3,8 ----
        * phpGroupWare - Notes                                                  
    *
        * http://www.phpgroupware.org                                           
    *
!       * Written by : Bettina Gille address@hidden                         *
!       * Based on notes by Andy Holman (LoCdOg)                                
    *
        * -------------------------------------------------                     
    *
        * This program is free software; you can redistribute it and/or modify 
it   *
***************
*** 28,37 ****
                        'save'                          => True,
                        'delete'                        => True,
!                       'check_perms'           => True,
!                       'set_font'                      => True,
!                       'set_font_size'         => True,
!                       'read_preferences'      => True,
!                       'save_preferences'      => True,
!                       'get_rows'                      => True
                );
  
--- 28,32 ----
                        'save'                          => True,
                        'delete'                        => True,
!                       'check_perms'           => True
                );
  
***************
*** 175,204 ****
                }
  
-               function set_font()
-               {
-                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['notes']['notes_font']))
-                       {
-                               $font = 
$GLOBALS['phpgw_info']['user']['preferences']['notes']['notes_font'];
-                       }
-                       else
-                       {
-                               $font = 'Arial';
-                       }
-                       return $font;
-               }
- 
-               function set_font_size()
-               {
-                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['notes']['notes_font_size']))
-                       {
-                               $font_size = 
$GLOBALS['phpgw_info']['user']['preferences']['notes']['notes_font_size'];
-                       }
-                       else
-                       {
-                               $font_size = '3';
-                       }
-                       return $font_size;
-               }
- 
                function read()
                {
--- 170,173 ----
***************
*** 256,302 ****
                                $this->so->delete($params);
                        }
-               }
- 
-               function read_preferences()
-               {
-                       $GLOBALS['phpgw']->preferences->read_repository();
- 
-                       $prefs = array();
- 
-                       if 
($GLOBALS['phpgw_info']['user']['preferences']['notes'])
-                       {
-                               $prefs['notes_font'] = 
$GLOBALS['phpgw_info']['user']['preferences']['notes']['notes_font'];
-                               $prefs['notes_font_size'] = 
$GLOBALS['phpgw_info']['user']['preferences']['notes']['notes_font_size'];
-                       }
-                       return $prefs;
-               }
- 
-               function save_preferences($prefs)
-               {
-                       $GLOBALS['phpgw']->preferences->read_repository();
- 
-                       if ($prefs)
-                       {
-                               
$GLOBALS['phpgw']->preferences->change('notes','notes_font',$prefs['notes_font']);
-                               
$GLOBALS['phpgw']->preferences->change('notes','notes_font_size',$prefs['notes_font_size']);
-                               
$GLOBALS['phpgw']->preferences->save_repository(True);
-                       }
-               }
- 
-               function get_rows($query)
-               {
-                       //echo 
"<p>notes.ui.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id]):
 notes_list =";
- 
-                       $notes_list = 
$this->read($query['start'],$query['search'],$query['filter'],$query['cat_id']);
-                       if (!is_array($notes_list))
-                       {
-                               $notes_list = array( 0 => 0 );
-                       }
-                       else
-                       {
-                               array_unshift($notes_list,$this->total_records);
-                               //_debug_array($notes_list);
-                       }
-                       return $notes_list;
                }
        }
--- 225,228 ----

Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.so.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.so.inc.php    27 Sep 2002 00:15:39 -0000      1.9
--- class.so.inc.php    27 Sep 2002 02:26:02 -0000      1.10
***************
*** 102,106 ****
                                        'date'          => 
$this->db->f('note_date'),
                                        'cat'           => 
(int)$this->db->f('note_category'),
!                                       'content'       => 
$this->db->f('note_content'),
                                        'grants'        => $ngrants
                                );
--- 102,106 ----
                                        'date'          => 
$this->db->f('note_date'),
                                        'cat'           => 
(int)$this->db->f('note_category'),
!                                       'content'       => 
stripslashes($this->db->f('note_content')),
                                        'grants'        => $ngrants
                                );
***************
*** 117,121 ****
                                $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');
--- 117,121 ----
                                $note['id']                     = 
(int)$this->db->f('note_id');
                                $note['owner']          = 
$this->db->f('note_owner');
!                               $note['content']        = 
stripslashes($this->db->f('note_content'));
                                $note['access']         = 
$this->db->f('note_access');
                                $note['date']           = 
$this->db->f('note_date');

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.ui.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.ui.inc.php    27 Sep 2002 01:08:44 -0000      1.29
--- class.ui.inc.php    27 Sep 2002 02:26:02 -0000      1.30
***************
*** 4,8 ****
        * http://www.phpgroupware.org                                           
    *
        * Written by : Bettina Gille address@hidden                         *
!       *              Andy Holman (LoCdOg)                                     
    *
        * -------------------------------------------------                     
    *
        * This program is free software; you can redistribute it and/or modify 
it   *
--- 4,8 ----
        * http://www.phpgroupware.org                                           
    *
        * Written by : Bettina Gille address@hidden                         *
!       * Based on notes by Andy Holman (LoCdOg)                                
    *
        * -------------------------------------------------                     
    *
        * This program is free software; you can redistribute it and/or modify 
it   *
***************
*** 245,249 ****
                        while (is_array($notes_list) && list(,$note) = 
each($notes_list))
                        {
!                               $words = split(' 
',$GLOBALS['phpgw']->strip_html($note['content']));
                                $first = "$words[0] $words[1] $words[2] 
$words[3] .....";
  
--- 245,249 ----
                        while (is_array($notes_list) && list(,$note) = 
each($notes_list))
                        {
!                               $words = split(' ',$note['content']);
                                $first = "$words[0] $words[1] $words[2] 
$words[3] .....";
  
***************
*** 280,284 ****
                        );
  
- 
                        $data = array
                        (
--- 280,283 ----
***************
*** 344,348 ****
                                'lang_save'                             => 
lang('save'),
                                'lang_done'                             => 
lang('done'),
!                               'value_content'                 => 
$GLOBALS['phpgw']->strip_html($note['content']),
                                'value_access'                  => 
$note['access'],
                                'value_cat'                             => 
$note['cat'],
--- 343,347 ----
                                'lang_save'                             => 
lang('save'),
                                'lang_done'                             => 
lang('done'),
!                               'value_content'                 => 
$note['content'],
                                'value_access'                  => 
$note['access'],
                                'value_cat'                             => 
$note['cat'],
***************
*** 471,543 ****
                        
$this->t->set_var('category',$this->cats->id2name($note['category']));
                        
$this->t->set_var('new_date',$GLOBALS['phpgw']->common->show_date($note['date']));
!                       
$this->t->set_var('fnote',nl2br($GLOBALS['phpgw']->strip_html($note['content'])));
                        $this->t->set_var('access',ucfirst($note['access']));
  
                        $this->t->pfp('out','view');
-               }
- 
-               function preferences()
-               {
-                       global $submit, $prefs;
- 
-                       if ($submit)
-                       {
-                               $this->bo->save_preferences($prefs);
-                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/preferences/index.php'));
-                               $GLOBALS['phpgw']->common->phpgw_exit();
-                       }
- 
-                       $GLOBALS['phpgw']->common->phpgw_header();
- 
-                       $this->t->set_file(array('preferences' => 
'preferences.tpl'));
-                       
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.preferences'));
- 
-                       $this->set_app_langs();
- 
-                       $this->t->set_var('lang_action',lang('Notes 
preferences'));
-                       $this->t->set_var('lang_select_font',lang('Choose a 
font'));
-                       $this->t->set_var('lang_select_size',lang('Choose the 
font size'));
- 
-                       $prefs = $this->bo->read_preferences();
- 
-                       switch($prefs['notes_font'])
-                       {
-                               case'Arial,Helvetica,sans-serif': 
$font_sel[0]=' selected'; break;
-                               case'Times New Roman,Times,serif': 
$font_sel[1]=' selected'; break;
-                               case'Verdana,Arial,Helvetica,sans-serif': 
$font_sel[2]=' selected'; break; 
-                               case'Georgia,Times New Roman,Times,serif': 
$font_sel[3]=' selected'; break;
-                               case'Courier New,Courier,mono': $font_sel[4]=' 
selected'; break;
-                               case'Helvetica,Arial,sans-serif': 
$font_sel[5]=' selected'; break; 
-                               
case'Tahoma,Verdana,Arial,Helvetica,sans-serif': $font_sel[6]=' selected'; 
break;
-                       }
- 
-                       $notes_font = '<option 
value="Arial,Helvetica,sans-serif"' . $font_sel[0] . '>' . lang('Arial') . 
'</option>' . "\n"
-                               . '<option value="Times New Roman,Times,serif"' 
. $font_sel[1] . '>' . lang('Times New Roman') . '</option>' . "\n"
-                               . '<option 
value="Verdana,Arial,Helvetica,sans-serif"' . $font_sel[2] . '>' . 
lang('Verdana') . '</option>' . "\n"
-                               . '<option value="Georgia,Times New 
Roman,Times,serif"' . $font_sel[3] . '>' . lang('Georgia') . '</option>' . "\n"
-                               . '<option value="Courier New,Courier,mono"' . 
$font_sel[4] . '>' . lang('Courier New') . '</option>' . "\n"
-                               . '<option value="Helvetica,Arial,sans-serif"' 
. $font_sel[5] . '>' . lang('Helvetica') . '</option>' . "\n"
-                               . '<option 
value="Tahoma,Verdana,Arial,Helvetica,sans-serif"' . $font_sel[6] . '>' . 
lang('Tahoma') . '</option>' . "\n";
- 
-                       $this->t->set_var('notes_font',$notes_font);
- 
-                       switch($prefs['notes_font_size'])
-                       {
-                               case 1: $size_sel[0]=' selected'; break;
-                               case 2: $size_sel[1]=' selected'; break;
-                               case 3: $size_sel[2]=' selected'; break;
-                               case 4: $size_sel[3]=' selected'; break;
-                               case 5: $size_sel[4]=' selected'; break;
-                       }
- 
-                       $notes_font_size = '<option value="1"' . $size_sel[0] . 
'>' . lang('Very Small') . '</option>' . "\n"
-                               . '<option value="2"' . $size_sel[1] . '>' . 
lang('Small') . '</option>' . "\n"
-                               . '<option value="3"' . $size_sel[2] . '>' . 
lang('Medium') . '</option>' . "\n"
-                               . '<option value="4"' . $size_sel[3] . '>' . 
lang('Large') . '</option>' . "\n"
-                               . '<option value="5"' . $size_sel[4] . '>' . 
lang('Very Large') . '</option>' . "\n";
- 
-                       $this->t->set_var('notes_font_size',$notes_font_size);
- 
-                       $this->t->pfp('out','preferences');
                }
        }
--- 470,477 ----
                        
$this->t->set_var('category',$this->cats->id2name($note['category']));
                        
$this->t->set_var('new_date',$GLOBALS['phpgw']->common->show_date($note['date']));
!                       $this->t->set_var('fnote',nl2br($note['content']));
                        $this->t->set_var('access',ucfirst($note['access']));
  
                        $this->t->pfp('out','view');
                }
        }

Index: hook_preferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/hook_preferences.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** hook_preferences.inc.php    12 Jan 2002 15:39:51 -0000      1.21
--- hook_preferences.inc.php    27 Sep 2002 02:26:02 -0000      1.22
***************
*** 14,21 ****
  // Only Modify the $file and $title variables.....
  
-               $title = $appname;
                $file = Array
                (
-                       'Preferences'     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.preferences'),
                        'Grant Access'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
                        'Edit categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=notes&cats_level=True&global_cats=True')
--- 14,19 ----
***************
*** 23,27 ****
  
  //Do not modify below this line
!               display_section($appname,$title,$file);
        }
  ?>
--- 21,25 ----
  
  //Do not modify below this line
!               display_section($appname,$appname,$file);
        }
  ?>

--- hook_add_def_pref.inc.php DELETED ---





reply via email to

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