phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] sms incclass.menu.inc.php incclass.uiautoreply....


From: Sigurd Nes
Subject: [Phpgroupware-cvs] sms incclass.menu.inc.php incclass.uiautoreply....
Date: Sun, 18 Jun 2006 14:49:41 +0000

CVSROOT:        /sources/phpgroupware
Module name:    sms
Changes by:     Sigurd Nes <sigurdne>   06/06/18 14:49:41

Modified files:
        inc            : class.menu.inc.php class.uiautoreply.inc.php 
                         class.uiboard.inc.php class.uicommand.inc.php 
                         class.uicustom.inc.php class.uipoll.inc.php 
        setup          : setup.inc.php tables_update.inc.php 

Log message:
        no message

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/sms/inc/class.menu.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/sms/inc/class.uiautoreply.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/sms/inc/class.uiboard.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/sms/inc/class.uicommand.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/sms/inc/class.uicustom.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/sms/inc/class.uipoll.inc.php?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/sms/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/sms/setup/tables_update.inc.php?cvsroot=phpgroupware&r1=1.7&r2=1.8

Patches:
Index: inc/class.menu.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/inc/class.menu.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- inc/class.menu.inc.php      8 Jun 2006 08:50:58 -0000       1.8
+++ inc/class.menu.inc.php      18 Jun 2006 14:49:41 -0000      1.9
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage core
-       * @version $Id: class.menu.inc.php,v 1.8 2006/06/08 08:50:58 sigurdne 
Exp $
+       * @version $Id: class.menu.inc.php,v 1.9 2006/06/18 14:49:41 sigurdne 
Exp $
        */
 
        /**
@@ -58,66 +58,68 @@
                        $menu['module'][$i]['statustext']       =       
lang('outbox');
                        $i++;
 
-                       if($sub=='.config')
+
+                       if($sub=='.autoreply')
                        {
                                $menu['module'][$i]['this']=True;
                        }
-                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiconfig.index');
-                       $menu['module'][$i]['name']                     =       
lang('config');
-                       $menu['module'][$i]['statustext']               =       
lang('config');
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiautoreply.index');
+                       $menu['module'][$i]['name']                     =       
lang('autoreply');
+                       $menu['module'][$i]['statustext']               =       
lang('autoreply');
                        $i++;
-
-                       $j=0;
-                       if ($sub == '.config')
+                       if($sub=='.board')
                        {
-                               if($page=='.config.type')
-                               {
-                                       $menu['sub_menu'][$j]['this']=True;
+                               $menu['module'][$i]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiconfig.index');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('admin');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('admin');
-                               $j++;
-
-                               if($page=='.config.autoreply')
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiboard.index');
+                       $menu['module'][$i]['name']                     =       
lang('boards');
+                       $menu['module'][$i]['statustext']               =       
lang('boards');
+                       $i++;
+                       if($sub=='.command')
                                {
-                                       $menu['sub_menu'][$j]['this']=True;
+                               $menu['module'][$i]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiautoreply.index');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('autoreply');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('autoreply');
-                               $j++;
-                               if($page=='.config.board')
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uicommand.index');
+                       $menu['module'][$i]['name']                     =       
lang('commands');
+                       $menu['module'][$i]['statustext']               =       
lang('commands');
+                       $i++;
+                       if($sub=='.custom')
                                {
-                                       $menu['sub_menu'][$j]['this']=True;
+                               $menu['module'][$i]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiboard.index');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('boards');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('boards');
-                               $j++;
-                               if($page=='.config.command')
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uicustom.index');
+                       $menu['module'][$i]['name']                     =       
lang('customs');
+                       $menu['module'][$i]['statustext']               =       
lang('customs');
+                       $i++;
+                       if($sub=='.poll')
                                {
-                                       $menu['sub_menu'][$j]['this']=True;
+                               $menu['module'][$i]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uicommand.index');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('commands');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('commands');
-                               $j++;
-                               if($page=='.config.custom')
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uipoll.index');
+                       $menu['module'][$i]['name']                     =       
lang('polls');
+                       $menu['module'][$i]['statustext']               =       
lang('polls');
+                       $i++;
+
+
+                       if($sub=='.config')
                                {
-                                       $menu['sub_menu'][$j]['this']=True;
+                               $menu['module'][$i]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uicustom.index');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('customs');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('customs');
-                               $j++;
-                               if($page=='.config.poll')
+                       $menu['module'][$i]['link']                     =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiconfig.index');
+                       $menu['module'][$i]['name']                     =       
lang('config');
+                       $menu['module'][$i]['statustext']               =       
lang('config');
+                       $i++;
+
+                       $j=0;
+                       if ($sub == '.config')
+                       {
+                               if($page=='.config.type')
                                {
                                        $menu['sub_menu'][$j]['this']=True;
                                }
-                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uipoll.index');
-                               $menu['sub_menu'][$j]['name']                   
=       lang('polls');
-                               $menu['sub_menu'][$j]['statustext']             
=       lang('polls');
+                               $menu['sub_menu'][$j]['link']                   
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiconfig.index');
+                               $menu['sub_menu'][$j]['name']                   
=       lang('config');
+                               $menu['sub_menu'][$j]['statustext']             
=       lang('config');
                                $j++;
                        }
 

Index: inc/class.uiautoreply.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/inc/class.uiautoreply.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inc/class.uiautoreply.inc.php       6 Jun 2006 13:20:22 -0000       1.2
+++ inc/class.uiautoreply.inc.php       18 Jun 2006 14:49:41 -0000      1.3
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage autoreply
-       * @version $Id: class.uiautoreply.inc.php,v 1.2 2006/06/06 13:20:22 
sigurdne Exp $
+       * @version $Id: class.uiautoreply.inc.php,v 1.3 2006/06/18 14:49:41 
sigurdne Exp $
        */
 
        /**
@@ -43,8 +43,8 @@
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->sms                              = 
CreateObject($this->currentapp.'.sms');
                        $this->acl                              = 
CreateObject('phpgwapi.acl');
-                       $this->acl_location                     = 
'.config.autoreply';
-                       $this->menu->sub                        = '.config';
+                       $this->acl_location                     = '.autoreply';
+                       $this->menu->sub                        = '.autoreply';
                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
                        $this->sort                             = 
$this->bo->sort;
@@ -70,8 +70,8 @@
                function index()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       $links = $this->menu->links('.config.autoreply');
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       $links = $this->menu->links();
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
 
                                $this->bocommon->no_access($links);
@@ -85,8 +85,6 @@
 
                        
$GLOBALS['phpgw']->session->appsession('session_data','sms_reply_receipt','');
 
-                       $links = $this->menu->links('.config.autoreply');
-
                        $autoreply_info = $this->bo->read();
 
                        while (is_array($autoreply_info) && list(,$entry) = 
each($autoreply_info))
@@ -264,9 +262,9 @@
                function add()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -320,9 +318,9 @@
                function add_yes()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -379,9 +377,9 @@
                function add_scenario()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -454,9 +452,9 @@
                function add_scenario_yes()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -529,9 +527,9 @@
                function edit_scenario()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -612,9 +610,9 @@
                function edit_scenario_yes()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -686,9 +684,9 @@
 
                function manage()
                {               
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 16))
                        {
-                               $links = 
$this->menu->links('.config.autoreply');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -703,11 +701,11 @@
                        $autoreply_id   = 
get_var('autoreply_id',array('POST','GET'));
                        $err    = urldecode(get_var('err',array('POST','GET')));
        
-                       if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+/*                     if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
                        {
                            $query_user_only = "AND uid='$uid'";
                        }
-
+*/
                        $sql = "SELECT * FROM phpgw_sms_featautoreply WHERE 
autoreply_id='$autoreply_id' $query_user_only";
        
                        $this->db->query($sql,__LINE__,__FILE__);
@@ -777,8 +775,9 @@
                function delete()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_DELETE))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }
@@ -850,8 +849,9 @@
                function delete_scenario()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_DELETE))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }

Index: inc/class.uiboard.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/inc/class.uiboard.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inc/class.uiboard.inc.php   5 Jun 2006 16:47:46 -0000       1.2
+++ inc/class.uiboard.inc.php   18 Jun 2006 14:49:41 -0000      1.3
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage board
-       * @version $Id: class.uiboard.inc.php,v 1.2 2006/06/05 16:47:46 
sigurdne Exp $
+       * @version $Id: class.uiboard.inc.php,v 1.3 2006/06/18 14:49:41 
sigurdne Exp $
        */
 
        /**
@@ -41,7 +41,7 @@
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->sms                              = 
CreateObject($this->currentapp.'.sms');
                        $this->acl                              = 
CreateObject('phpgwapi.acl');
-                       $this->acl_location                     = '.config';
+                       $this->acl_location                     = '.board';
                        $this->menu->sub                        
=$this->acl_location;
                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
@@ -56,9 +56,9 @@
                function index()
                {
 
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = $this->menu->links('.config.board');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -86,11 +86,11 @@
                            <a href=\"$add_url\">[  Add SMS board ]</a>
                            <p>
                        ";
-                       if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+/*                     if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
                        {
                            $query_user_only = "WHERE uid='" . $this->account 
."'";
                        }
-
+*/
                        $sql = "SELECT * FROM phpgw_sms_featboard 
$query_user_only ORDER BY board_code";
                        $this->db->query($sql,__LINE__,__FILE__);       
                        while ($this->db->next_record())
@@ -109,7 +109,7 @@
                        ";
 
                                $done_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uiconfig.index');
+                               'menuaction'    => 
$this->currentapp.'.uisms.index');
                                
                                $done_url = 
$GLOBALS['phpgw']->link('/index.php',$done_data);
 
@@ -127,9 +127,9 @@
                function view()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -188,9 +188,9 @@
                function add()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -246,9 +246,9 @@
                function add_yes()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -315,9 +315,9 @@
                function edit()
                {
        
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -378,9 +378,9 @@
 
                function edit_yes()
                {
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -439,8 +439,9 @@
                function delete()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_DELETE))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }

Index: inc/class.uicommand.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/inc/class.uicommand.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inc/class.uicommand.inc.php 5 Jun 2006 16:47:46 -0000       1.2
+++ inc/class.uicommand.inc.php 18 Jun 2006 14:49:41 -0000      1.3
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage command
-       * @version $Id: class.uicommand.inc.php,v 1.2 2006/06/05 16:47:46 
sigurdne Exp $
+       * @version $Id: class.uicommand.inc.php,v 1.3 2006/06/18 14:49:41 
sigurdne Exp $
        */
 
        /**
@@ -41,7 +41,7 @@
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->sms                              = 
CreateObject($this->currentapp.'.sms');
                        $this->acl                              = 
CreateObject('phpgwapi.acl');
-                       $this->acl_location                     = '.config';
+                       $this->acl_location                     = '.command';
                        $this->menu->sub                        
=$this->acl_location;
                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
@@ -69,10 +69,10 @@
                function index()
                {
 
-                       $links = $this->menu->links('.config.command');
+                       $links = $this->menu->links();
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
 
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
                                $this->bocommon->no_access($links);
                                return;
@@ -86,8 +86,6 @@
 
                        
$GLOBALS['phpgw']->session->appsession('session_data','sms_command_receipt','');
 
-                       $links = $this->menu->links('.config.command');
-
                        $command_info = $this->bo->read();
 
                        while (is_array($command_info) && list(,$entry) = 
each($command_info))
@@ -206,13 +204,26 @@
                function edit_command()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+
+                       $links = $this->menu->links();
+                       $command_id     = 
get_var('command_id',array('POST','GET'));
+                       if($command_id)
+                       {
+                               if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
+                               {
+                                       $this->bocommon->no_access($links);
+                                       return;
+                               }
+                       }
+                       else
+                       {
+                               if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
                                $this->bocommon->no_access($links);
                                return;
                        }
+                       }
 
-                       $command_id     = 
get_var('command_id',array('POST','GET'));
                        $values         = get_var('values',array('POST'));
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('command'));
@@ -339,259 +350,12 @@
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_command' => $data));
                }
 
-
-               function add()
-               {
-               
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
-                       {
-                               $links = 
$this->menu->links('.config.autoreplay');
-                               $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
-                               $this->bocommon->no_access($links);
-                               return;
-                       }
-                       
-                       
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('SMS').' - '.lang('Add SMS command');
-                       $GLOBALS['phpgw']->common->phpgw_header();
-
-                       echo parse_navbar();
-
-                       $err    = urldecode(get_var('err',array('POST','GET')));
-                       $command_code   = 
get_var('command_code',array('POST','GET'));
-                       $command_exec   = 
get_var('command_exec',array('POST','GET'));
-
-                       if ($err)
-                       {
-                           $content = "<p><font color=red>$err</font><p>";
-                       }
-
-                       $add_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uicommand.add_yes',
-                               'command_id' => $command_id
-                               );
-                               
-                       $add_url = 
$GLOBALS['phpgw']->link('/index.php',$add_data);
-
-                       $content .= "
-                           <p>
-                           <form action=$add_url method=post>
-                           <p>SMS command code: <input type=text size=10 
maxlength=10 name=command_code value=\"$command_code\">
-                           <p>Pass these parameter to command URL field:
-                           <p>##SMSDATETIME## replaced by SMS incoming 
date/time
-                           <p>##SMSSENDER## replaced by sender number
-                           <p>##COMMANDCODE## replaced by command code 
-                           <p>##COMMANDPARAM## replaced by command parameter 
passed to server from SMS
-                           <p>SMS command binary path : <b>".PHPGW_SERVER_ROOT 
. SEP . 'sms' . SEP . 'bin' ."</b>
-                           <p>SMS command exec: <input type=text size=60 
maxlength=200 name=command_exec value=\"$command_exec\">
-                           <p><input type=submit class=button value=Add>
-                           </form>
-                       ";
-
-                       $done_data = array('menuaction' => 
$this->currentapp.'.uicommand.index');
-                       $done_url = 
$GLOBALS['phpgw']->link('/index.php',$done_data);
-
-                       $content .= "
-                           <p>
-                           <a href=\"$done_url\">[ Done ]</a>
-                           <p>
-                       ";
-
-                       echo $content;
-               }
-
-               function add_yes()
-               {
-               
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
-                       {
-                               $links = 
$this->menu->links('.config.autoreplay');
-                               $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
-                               $this->bocommon->no_access($links);
-                               return;
-                       }
-
-                       $command_code   = 
strtoupper(get_var('command_code',array('POST','GET')));
-                       $command_exec   = 
get_var('command_exec',array('POST','GET'));
-
-                       $uid = $this->account;
-                       $target = 'add';
-
-                       if ($command_code && $command_exec)
-                       {
-
-                               $command_exec = PHPGW_SERVER_ROOT . SEP . 'sms' 
. SEP . 'bin/' . $command_exec;
-                               $command_exec = 
str_replace("//","/",$command_exec);
-                               $command_exec = 
str_replace("..",".",$command_exec);
-
-
-                           if ($this->sms->checkavailablecode($command_code))
-                               {
-                                       $command_exec = 
$this->db->db_addslashes($command_exec);
-
-                                       $sql = "INSERT INTO 
phpgw_sms_featcommand (uid,command_code,command_exec) VALUES 
('$uid','$command_code','$command_exec')";
-                                       $this->db->transaction_begin();
-
-                                       
$this->db->query($sql,__LINE__,__FILE__);
-
-                                       $new_uid = 
$this->db->get_last_insert_id(phpgw_sms_featcommand,'command_id');
-
-                                       $this->db->transaction_commit();
-                                       
-                                       if ($new_uid)
-                                       {
-                                   $error_string = "SMS command code 
`$command_code` has been added";
-                                       }
-                                       else
-                                       {
-                                   $error_string = "Fail to add SMS command 
code `$command_code`";
-                                       }
-                           }
-                           else
-                           {
-                                       $error_string = "SMS code 
`$command_code` already exists, reserved or use by other feature!";
-                           }
-                       }
-                       else
-                       {
-                           $error_string = "You must fill all fields!";
-                       }
-
-                       $add_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uicommand.' . $target,
-                               'err' => urlencode($error_string)
-                               );
-
-                       
$GLOBALS['phpgw']->redirect_link('/index.php',$add_data);
-               }
-
-
-               function edit_old()
-               {
-       
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
-                       {
-                               $links = 
$this->menu->links('.config.autoreplay');
-                               $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
-                               $this->bocommon->no_access($links);
-                               return;
-                       }
-               
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('SMS').' - '.lang('Edit SMS command');
-                       $GLOBALS['phpgw']->common->phpgw_header();
-
-                       echo parse_navbar();
-
-                       $err    = urldecode(get_var('err',array('POST','GET')));
-                       $command_id     = 
get_var('command_id',array('POST','GET'));
-                       $command_code   = 
get_var('command_code',array('POST','GET'));
-                       $command_exec   = 
get_var('command_exec',array('POST','GET'));
-
-                       if ($err)
-                       {
-                           $content = "<p><font color=red>$err</font><p>";
-                       }
-
-
-                       $sql = "SELECT * FROM phpgw_sms_featcommand WHERE 
command_id='$command_id'";
-                       $this->db->query($sql,__LINE__,__FILE__);
-                       $this->db->next_record();
-                       $command_code = $this->db->f('command_code');
-
-                       $add_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uicommand.edit_yes',
-                               'command_id' => $command_id,
-                               'command_code' => $command_code,
-                               );
-                               
-                       $add_url = 
$GLOBALS['phpgw']->link('/index.php',$add_data);
-
-                       $command_exec = 
stripslashes($this->db->f('command_exec'));
-
-                       $bin_path = PHPGW_SERVER_ROOT . SEP . 'sms' . SEP . 
'bin';
-                       $command_exec = str_replace($bin_path,'',$command_exec);
-
-                       $content .= "
-                           <p>
-                           <form action=$add_url method=post>
-                           <p>SMS command code: <b>$command_code</b>
-                           <p>Pass these parameter to command URL field:
-                           <p>##SMSDATETIME## replaced by SMS incoming 
date/time
-                           <p>##SMSSENDER## replaced by sender number
-                           <p>##commandCODE## replaced by command code 
-                           <p>##COMMANDPARAM## replaced by command parameter 
passed to server from SMS
-                           <p>SMS command binary path : <b>".PHPGW_SERVER_ROOT 
. SEP . 'sms' . SEP . 'bin' ."</b>
-                           <p>SMS command exec: <input type=text size=60 
name=command_exec value=\"$command_exec\">
-                           <p><input type=submit class=button value=Save>
-                           </form>
-                       ";
-
-                       $done_data = array('menuaction' => 
$this->currentapp.'.uicommand.index');
-                       $done_url = 
$GLOBALS['phpgw']->link('/index.php',$done_data);
-
-                       $content .= "
-                           <p>
-                           <a href=\"$done_url\">[ Done ]</a>
-                           <p>
-                       ";
-
-                       echo $content;
-               }
-
-               function edit_yes()
-               {
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
-                       {
-                               $links = 
$this->menu->links('.config.autoreplay');
-                               $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
-                               $this->bocommon->no_access($links);
-                               return;
-                       }
-
-                       $command_id     = 
get_var('command_id',array('POST','GET'));
-                       $command_code   = 
get_var('command_code',array('POST','GET'));
-                       $command_exec   = 
get_var('command_exec',array('POST','GET'));
-
-                       $uid = $this->account;
-                       $target = 'edit';
-
-                       if ($command_id && $command_code && $command_exec)
-                       {
-                               $command_exec = 
$this->db->db_addslashes($command_exec);
-                               
-                               $sql = "UPDATE phpgw_sms_featcommand SET 
command_exec='$command_exec' WHERE command_code='$command_code'";
-                               $this->db->transaction_begin();
-                               $this->db->query($sql,__LINE__,__FILE__);
-                               if ($this->db->affected_rows()>0)
-                               {
-                                       $error_string = "SMS command code 
`$command_code` has been saved";
-                               }
-                               else
-                               {
-                                   $error_string = "Fail to save SMS command 
code `$command_code`";
-                               }
-                               $this->db->transaction_commit();
-                       }
-                       else
-                       {
-                           $error_string = "You must fill all fields!";
-                       }
-
-                       $add_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uicommand.' . $target,
-                               'command_id' => $command_id,
-                               'err' => urlencode($error_string)
-                               );
-
-                       
$GLOBALS['phpgw']->redirect_link('/index.php',$add_data);
-               }
-
-
                function delete()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_DELETE))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }

Index: inc/class.uicustom.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/inc/class.uicustom.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inc/class.uicustom.inc.php  1 Jun 2006 12:30:22 -0000       1.2
+++ inc/class.uicustom.inc.php  18 Jun 2006 14:49:41 -0000      1.3
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage custom
-       * @version $Id: class.uicustom.inc.php,v 1.2 2006/06/01 12:30:22 
sigurdne Exp $
+       * @version $Id: class.uicustom.inc.php,v 1.3 2006/06/18 14:49:41 
sigurdne Exp $
        */
 
        /**
@@ -40,7 +40,7 @@
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->sms                              = 
CreateObject($this->currentapp.'.sms');
                        $this->acl                              = 
CreateObject('phpgwapi.acl');
-                       $this->acl_location                     = '.config';
+                       $this->acl_location                     = '.custom';
                        $this->menu->sub                        
=$this->acl_location;
                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
@@ -55,9 +55,9 @@
                function index()
                {
 
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = $this->menu->links('.config.custom');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -85,11 +85,11 @@
                            <a href=\"$add_url\">[  Add SMS custom ]</a>
                            <p>
                        ";
-                       if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+/*                     if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
                        {
                            $query_user_only = "WHERE uid='" . $this->account 
."'";
                        }
-
+*/
                        $sql = "SELECT * FROM phpgw_sms_featcustom 
$query_user_only ORDER BY custom_code";
                        $this->db->query($sql,__LINE__,__FILE__);       
                        while ($this->db->next_record())
@@ -107,7 +107,7 @@
                        ";
 
                                $done_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uiconfig.index');
+                               'menuaction'    => 
$this->currentapp.'.uisms.index');
                                
                                $done_url = 
$GLOBALS['phpgw']->link('/index.php',$done_data);
 
@@ -120,14 +120,11 @@
                        echo $content;  
                }
 
-
-
                function add()
                {
-               
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -183,10 +180,9 @@
 
                function add_yes()
                {
-               
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_ADD))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -243,10 +239,9 @@
 
                function edit()
                {
-       
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -314,9 +309,9 @@
 
                function edit_yes()
                {
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_EDIT))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -365,8 +360,9 @@
                function delete()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_DELETE))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }

Index: inc/class.uipoll.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/inc/class.uipoll.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- inc/class.uipoll.inc.php    8 Jun 2006 08:50:58 -0000       1.1
+++ inc/class.uipoll.inc.php    18 Jun 2006 14:49:41 -0000      1.2
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage polls
-       * @version $Id: class.uipoll.inc.php,v 1.1 2006/06/08 08:50:58 sigurdne 
Exp $
+       * @version $Id: class.uipoll.inc.php,v 1.2 2006/06/18 14:49:41 sigurdne 
Exp $
        */
 
        /**
@@ -43,7 +43,7 @@
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->sms                              = 
CreateObject($this->currentapp.'.sms');
                        $this->acl                              = 
CreateObject('phpgwapi.acl');
-                       $this->acl_location                     = '.config';
+                       $this->acl_location                     = '.poll';
                        $this->menu->sub                        
=$this->acl_location;
                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
@@ -71,10 +71,10 @@
                function index()
                {
 
-                       $links = $this->menu->links('.config.poll');
+                       $links = $this->menu->links();
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
 
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
                                $this->bocommon->no_access($links);
                                return;
@@ -88,13 +88,10 @@
 
                        
$GLOBALS['phpgw']->session->appsession('session_data','sms_poll_receipt','');
 
-                       $links = $this->menu->links('.config.poll');
-
                        $poll_info = $this->bo->read();
 
                        while (is_array($poll_info) && list(,$entry) = 
each($poll_info))
                        {
-
                                
if($this->bocommon->check_perms($entry['grants'], PHPGW_ACL_DELETE))
                                {
                                        $link_delete            = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipoll.delete&poll_id='
 . $entry['id']);
@@ -216,90 +213,12 @@
                        $this->save_sessiondata();
                }
 
-
-               function index_old()
-               {
-
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
-                       {
-                               $links = $this->menu->links('.config.poll');
-                               $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
-                               $this->bocommon->no_access($links);
-                               return;
-                       }
-                       
-                       
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('SMS').' - '.lang('List/Edit/Delete SMS polls');
-                       $GLOBALS['phpgw']->common->phpgw_header();
-
-                       echo parse_navbar();
-
-                       $err    = urldecode(get_var('err',array('POST','GET')));
-       
-                       if ($err)
-                       {
-                           $content = "<p><font color=red>$err</font><p>";
-                       }
-
-
-                       $add_data = array('menuaction'  => 
$this->currentapp.'.uipoll.add');
-                       $add_url = 
$GLOBALS['phpgw']->link('/index.php',$add_data);
-
-                       $content .= "
-                           <p>
-                           <a href=\"$add_url\">[  Add SMS poll ]</a>
-                           <p>
-                       ";
-                       if (!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
-                       {
-                           $query_user_only = "WHERE uid='" . $this->account 
."'";
-                       }
-
-                       $sql = "SELECT * FROM phpgw_sms_featpoll 
$query_user_only ORDER BY poll_id";
-                       $this->db->query($sql,__LINE__,__FILE__);       
-                       while ($this->db->next_record())
-                       {
-                               $owner = 
$GLOBALS['phpgw']->accounts->id2name($this->db->f('uid'));
-                               $poll_status = "<font color=red>Disable</font>";
-                               if ($this->db->f('poll_enable'))
-                               {
-                                       $poll_status = "<font 
color=green>Enable</font>";
-                               }
-
-                               $content .= "[<a href=" . 
$GLOBALS['phpgw']->link('/index.php','menuaction=sms.uipoll.view&poll_id=' . 
$this->db->f('poll_id')) . ">v</a>] ";
-                               $content .= "[<a href=" . 
$GLOBALS['phpgw']->link('/index.php','menuaction=sms.uipoll.edit&poll_id=' . 
$this->db->f('poll_id')) . ">e</a>] ";
-                               $content .= "[<a href=" . 
$GLOBALS['phpgw']->link('/index.php','menuaction=sms.uipoll.delete&poll_id=' . 
$this->db->f('poll_id')) . ">x</a>] ";
-                               $content .= " <b>Status:</b> $poll_status 
&nbsp;&nbsp;<b>Code:</b>" . $this->db->f('poll_code') . " 
&nbsp;&nbsp;<b>Title:</b>" . $this->db->f('poll_title') . 
"&nbsp;&nbsp;<b>User:</b> $owner<br>";
-                       }
-
-                       $content .= "
-                           <p>
-                           <a href=\"$add_url\">[  Add SMS poll ]</a>
-                           <p>
-                       ";
-
-                               $done_data = array(
-                               'menuaction'    => 
$this->currentapp.'.uiconfig.index');
-                               
-                               $done_url = 
$GLOBALS['phpgw']->link('/index.php',$done_data);
-
-                               $content .= "
-                                   <p><li>
-                                   <a href=\"$done_url\">Back</a>
-                                   <p>
-                               ";
-
-                       echo $content;  
-               }
-
-
-
                function add()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -352,9 +271,9 @@
                function add_yes()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -410,9 +329,9 @@
                function add_choice()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -471,9 +390,9 @@
                function status()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -508,9 +427,9 @@
                function edit()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -640,9 +559,9 @@
                function edit_yes()
                {
                
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = 
$this->menu->links('.config.autoreplay');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -686,9 +605,9 @@
 
                function view()
                {
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
-                               $links = $this->menu->links('.config.poll');
+                               $links = $this->menu->links();
                                $GLOBALS['phpgw_info']['flags']['xslt_app'] = 
True;
                                $this->bocommon->no_access($links);
                                return;
@@ -792,8 +711,9 @@
                function delete()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }
@@ -864,8 +784,9 @@
                function delete_choice()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       if(!$this->acl->check('run', PHPGW_ACL_READ,'admin'))
+                       if(!$this->acl->check($this->acl_location, 
PHPGW_ACL_READ))
                        {
+                               $links = $this->menu->links();
                                $this->bocommon->no_access($links);
                                return;
                        }

Index: setup/setup.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/setup/setup.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- setup/setup.inc.php 6 Jun 2006 08:36:13 -0000       1.8
+++ setup/setup.inc.php 18 Jun 2006 14:49:41 -0000      1.9
@@ -6,12 +6,12 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package sms
        * @subpackage setup
-       * @version $Id: setup.inc.php,v 1.8 2006/06/06 08:36:13 sigurdne Exp $
+       * @version $Id: setup.inc.php,v 1.9 2006/06/18 14:49:41 sigurdne Exp $
        */
 
        $setup_info['sms']['name']      = 'sms';
        $setup_info['sms']['title']= 'SMS';
-       $setup_info['sms']['version']   = '0.9.17.505';
+       $setup_info['sms']['version']   = '0.9.17.506';
        $setup_info['sms']['app_order'] = 8;
        $setup_info['sms']['enable']    = 1;
        $setup_info['sms']['app_group'] = 'office';

Index: setup/tables_update.inc.php
===================================================================
RCS file: /sources/phpgroupware/sms/setup/tables_update.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- setup/tables_update.inc.php 6 Jun 2006 08:36:13 -0000       1.7
+++ setup/tables_update.inc.php 18 Jun 2006 14:49:41 -0000      1.8
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package sms
        * @subpackage setup
-       * @version $Id: tables_update.inc.php,v 1.7 2006/06/06 08:36:13 
sigurdne Exp $
+       * @version $Id: tables_update.inc.php,v 1.8 2006/06/18 14:49:41 
sigurdne Exp $
        */
 
        /**
@@ -191,3 +191,20 @@
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
                return $GLOBALS['setup_info']['sms']['currentver'];
        }
\ No newline at end of file
+       
+       $test[] = '0.9.17.505';
+       function sms_upgrade0_9_17_505()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
phpgw_acl_location (appname,id, descr) VALUES ('sms', '.autoreply', 
'Autoreply')");
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
phpgw_acl_location (appname,id, descr) VALUES ('sms', '.board', 'Board')");
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
phpgw_acl_location (appname,id, descr) VALUES ('sms', '.command', 'Command')");
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
phpgw_acl_location (appname,id, descr) VALUES ('sms', '.custom', 'Custom')");
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
phpgw_acl_location (appname,id, descr) VALUES ('sms', '.poll', 'Poll')");
+
+               
+               $GLOBALS['setup_info']['sms']['currentver'] = '0.9.17.506';
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
+               return $GLOBALS['setup_info']['sms']['currentver'];
+       }
\ No newline at end of file




reply via email to

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