phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] preferences/inc class.bocommon.inc.php class.ui...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] preferences/inc class.bocommon.inc.php class.ui...
Date: Thu, 05 Oct 2006 11:34:52 +0000

CVSROOT:        /sources/phpgroupware
Module name:    preferences
Changes by:     Sigurd Nes <sigurdne>   06/10/05 11:34:52

Modified files:
        inc            : class.bocommon.inc.php 
                         class.uiadmin_acl.inc.php 
Removed files:
        inc            : class.socommon.inc.php 

Log message:
        Clean up

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.bocommon.inc.php?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.uiadmin_acl.inc.php?cvsroot=phpgroupware&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.socommon.inc.php?cvsroot=phpgroupware&r1=1.2&r2=0

Patches:
Index: class.bocommon.inc.php
===================================================================
RCS file: /sources/phpgroupware/preferences/inc/class.bocommon.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- class.bocommon.inc.php      14 Mar 2006 10:30:54 -0000      1.1
+++ class.bocommon.inc.php      5 Oct 2006 11:34:52 -0000       1.2
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package hrm
        * @subpackage core
-       * @version $Id: class.bocommon.inc.php,v 1.1 2006/03/14 10:30:54 
sigurdne Exp $
+       * @version $Id: class.bocommon.inc.php,v 1.2 2006/10/05 11:34:52 
sigurdne Exp $
        */
 
        /**
@@ -24,14 +24,6 @@
                var $sort;
                var $order;
                var $cat_id;
-               var $district_id;
-
-
-               var $public_functions = array
-               (
-                       'select_part_of_town'   => True,
-                       'menu'  => True,
-               );
 
                var $soap_functions = array(
                        'list' => array(
@@ -55,13 +47,8 @@
                function bocommon()
                {
                        $this->currentapp               = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->socommon                 = 
CreateObject($this->currentapp.'.socommon');
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
 
-                       $this->join                     = $this->socommon->join;
-                       $this->left_join        = $this->socommon->left_join;
-                       $this->like                     = $this->socommon->like;
-
                        switch($GLOBALS['phpgw_info']['server']['db_type'])
                        {
                                case 'mssql':
@@ -86,11 +73,6 @@
                        return ($rights & $required);
                }
 
-               function create_preferences($app='',$user_id='')
-               {
-                       return 
$this->socommon->create_preferences($app,$user_id);
-               }
-
                function msgbox_data($receipt)
                {
                        $msgbox_data_error=array();
@@ -439,17 +421,6 @@
                        return $value_set;
                }
 
-               function fm_cache($name='',$value='')
-               {
-                       return $this->socommon->fm_cache($name,$value);
-               }
-
-               function next_id($table,$key='')
-               {
-                       return $this->socommon->next_id($table,$key);
-               }
-
-
                function no_access($links = '')
                {
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('no_access','menu'));
@@ -469,8 +440,4 @@
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('no_access' => $data));
                }
-
-               function new_db()
-               {
                        return $this->socommon->new_db();
-               }
        }

Index: class.uiadmin_acl.inc.php
===================================================================
RCS file: /sources/phpgroupware/preferences/inc/class.uiadmin_acl.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- class.uiadmin_acl.inc.php   4 Oct 2006 12:28:39 -0000       1.9
+++ class.uiadmin_acl.inc.php   5 Oct 2006 11:34:52 -0000       1.10
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package preferences
        * @subpackage acl
-       * @version $Id: class.uiadmin_acl.inc.php,v 1.9 2006/10/04 12:28:39 
skwashd Exp $
+       * @version $Id: class.uiadmin_acl.inc.php,v 1.10 2006/10/05 11:34:52 
sigurdne Exp $
        */
 
        /**

Index: class.socommon.inc.php
===================================================================
RCS file: class.socommon.inc.php
diff -N class.socommon.inc.php
--- class.socommon.inc.php      26 Mar 2006 19:58:21 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,105 +0,0 @@
-<?php
-       /**
-       * phpGroupWare - HRM: a  human resource competence management system.
-       *
-       * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
-       * @package hrm
-       * @subpackage core
-       * @version $Id: class.socommon.inc.php,v 1.2 2006/03/26 19:58:21 
sigurdne Exp $
-       */
-
-       /**
-        * Description
-        * @package hrm
-        */
-
-       class socommon
-       {
-               function socommon()
-               {
-
-                       $this->currentapp               = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-
-                       $this->db = CreateObject('phpgwapi.db');
-                       $this->db->Host = 
$GLOBALS['phpgw_info']['server']['db_host'];
-                       $this->db->Type = 
$GLOBALS['phpgw_info']['server']['db_type'];
-                       $this->db->Database = 
$GLOBALS['phpgw_info']['server']['db_name'];
-                       $this->db->User = 
$GLOBALS['phpgw_info']['server']['db_user'];
-                       $this->db->Password = 
$GLOBALS['phpgw_info']['server']['db_pass'];
-
-                       $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
-
-                       if 
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
-                       {
-                               $this->join = " JOIN ";
-                               $this->like = "ILIKE";
-                       }
-                       else
-                       {
-                               $this->join = " INNER JOIN ";
-                               $this->like = "LIKE";
-                       }
-
-                       $this->left_join = " LEFT JOIN ";
-               }
-
-               function fm_cache($name='',$value='')
-               {
-                       if($value)
-                       {
-                               $value = serialize($value);
-                               $this->db->query("INSERT INTO fm_cache 
(name,value)VALUES ('$name','$value')",__LINE__,__FILE__);
-                       }
-                       else
-                       {
-                               $this->db->query("SELECT value FROM fm_cache 
where name='$name'");
-                               $this->db->next_record();
-                               $value= unserialize($this->db->f('value'));
-                               return $value;
-                       }
-               }
-
-               function create_preferences($app='',$user_id='')
-               {
-                               $this->db->query("SELECT preference_value FROM 
phpgw_preferences where preference_app = '$app' AND 
preference_owner=".(int)$user_id );
-                               $this->db->next_record();
-                               $value= 
unserialize($this->db->f('preference_value'));
-                               return $value;
-               }
-
-
-               function next_id($table='',$key='')
-               {
-                       if(is_array($key))
-                       {
-                               while (is_array($key) && list($column,$value) = 
each($key))
-                               {
-                                       if($value)
-                                       {
-                                               $condition[] = $column . "='" . 
$value . "'";
-                                       }
-                               }
-
-                               $where=' WHERE ' . implode(" AND ", $condition);
-                       }
-
-                       $this->db->query("SELECT max(id) as maximum FROM $table 
$where",__LINE__,__FILE__);
-                       $this->db->next_record();
-                       $next_id = $this->db->f('maximum')+1;
-                       return "$next_id";
-               }
-
-               function new_db()
-               {
                        $db = CreateObject('phpgwapi.db');
-                       $db->Host = $GLOBALS['phpgw_info']['server']['db_host'];
-                       $db->Type = $GLOBALS['phpgw_info']['server']['db_type'];
-                       $db->Database = 
$GLOBALS['phpgw_info']['server']['db_name'];
-                       $db->User = $GLOBALS['phpgw_info']['server']['db_user'];
-                       $db->Password = 
$GLOBALS['phpgw_info']['server']['db_pass'];
-                       return $db;
-               }
-
-       }




reply via email to

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