phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api class.base.php, 1.1.1.1.2.1, 1.1.1.1.2.2 class.ph


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] api class.base.php, 1.1.1.1.2.1, 1.1.1.1.2.2 class.phpgw.php, 1.1.1.1.2.1, 1.1.1.1.2.2 class.setup.php, 1.1.1.1.2.5, 1.1.1.1.2.6
Date: Fri, 24 Oct 2003 06:22:17 +0000

Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv29719/api

Modified Files:
      Tag: proposal-branch
        class.base.php class.phpgw.php class.setup.php 
Log Message:
made main menu a little dynamic, moved admin class to the api and removed the 
admin app

Index: class.base.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.base.php,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.2
diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2
*** class.base.php      24 Oct 2003 04:04:41 -0000      1.1.1.1.2.1
--- class.base.php      24 Oct 2003 06:22:15 -0000      1.1.1.1.2.2
***************
*** 31,34 ****
--- 31,35 ----
                        $GLOBALS['phpgw']->add_xsl('api.start');
                        
$GLOBALS['phpgw']->hooks->execute(array('hook'=>'api.base.start', 
'fname'=>'test_firstname', 'lname'=>'test_lastname'));
+                       $GLOBALS['phpgw_xml_apinode']->add_node('Home','title');
                        return $result;
                }
***************
*** 49,52 ****
--- 50,54 ----
                {
                        $GLOBALS['phpgw']->add_xsl('api.about');
+                       
$GLOBALS['phpgw_xml_apinode']->add_node('About','title');
                        return array('blah');
                }               

Index: class.setup.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.setup.php,v
retrieving revision 1.1.1.1.2.5
retrieving revision 1.1.1.1.2.6
diff -C2 -d -r1.1.1.1.2.5 -r1.1.1.1.2.6
*** class.setup.php     24 Oct 2003 00:58:54 -0000      1.1.1.1.2.5
--- class.setup.php     24 Oct 2003 06:22:15 -0000      1.1.1.1.2.6
***************
*** 37,40 ****
--- 37,41 ----
                        $args->set('stage', '0', 'int');
                        $args = $args->get(func_get_args(),__LINE__,__FILE__);
+                       
$GLOBALS['phpgw_xml_apinode']->add_node('Setup','title');
                        $GLOBALS['phpgw']->add_xsl('api.setup');
                        $GLOBALS['phpgw']->add_xsl('api.widgets');
***************
*** 53,68 ****
--- 54,74 ----
                                        case 1:
                                                
$this->configfile(func_get_args());
+                                               
$GLOBALS['phpgw_xml_apinode']->add_node('Stage 1','subtitle');
                                                break;
                                        case 2:
+                                               
$GLOBALS['phpgw_xml_apinode']->add_node('Stage 2','subtitle');
                                                
$this->installer(func_get_args());
                                                break;
                                        case 3:
+                                               
$GLOBALS['phpgw_xml_apinode']->add_node('Stage 3','subtitle');
                                                //$this->config();
                                                //$this->install_log['message'] 
= 'Config.';
                                                break;
                                        case 4:
+                                               
$GLOBALS['phpgw_xml_apinode']->add_node('Stage 4','subtitle');
                                                
$this->initial_accounts(func_get_args());
                                                break;
                                        default:
+                                               
$GLOBALS['phpgw_xml_apinode']->add_node('Welcome','subtitle');
                                                $this->install_log['message'] = 
'Welcome to the setup program. Please choose the task you want to accomplish.';
                                }                                               
***************
*** 427,430 ****
--- 433,437 ----
                                $all_acl = createobject('api_acl', 
array('account_id'=>0));
                                $all_acl->add('api',63,1);
+                               $all_acl->add('api.base.about',1);
                                $all_acl->add('api.base.login',1);
                                

Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.2
diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2
*** class.phpgw.php     23 Oct 2003 23:53:04 -0000      1.1.1.1.2.1
--- class.phpgw.php     24 Oct 2003 06:22:15 -0000      1.1.1.1.2.2
***************
*** 119,122 ****
--- 119,164 ----
                }
  
+               function apimenu()
+               {
+                       if(is_object($this->acl))
+                       {
+                               if($this->acl->check('api.base.start', 1))
+                               {
+                                       $menu[] = array(
+                                               'title' => 'Home',
+                                               'op'    => 'api.base.start',
+                                       );
+                               }
+                               if($this->acl->check('api.admin.start', 1))
+                               {
+                                       $menu[] = array(
+                                               'title' => 'Admin',
+                                               'op'    => 'api.admin.start',
+                                       );
+                               }
+                               if($this->acl->check('api.base.prefs', 1))
+                               {
+                                       $menu[] = array(
+                                               'title' => 'Preferences',
+                                               'op'    => 'api.base.prefs',
+                                       );
+                               }
+                               if($this->acl->check('api.base.about', 1))
+                               {
+                                       $menu[] = array(
+                                               'title' => 'About',
+                                               'op'    => 'api.base.about',
+                                       );
+                               }
+                       }
+                       $menu[] = array(
+                               'title' => 'Logout',
+                               'op'    => 'api.base.logout',
+                       );
+ 
+                       return $menu;
+               }
+ 
+               
                function phpgw_out($loadmainxsl = True, $loadmaincss = True)
                {
***************
*** 139,142 ****
--- 181,186 ----
                                
$GLOBALS['phpgw_xml_apinode']->add_node($this->hooks->data,'hooks');
                        }
+ 
+                       
$GLOBALS['phpgw_xml_apinode']->add_node($this->apimenu(),'apimenu');
                        
                        /* Add the css files to the API XML node */





reply via email to

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