gunnar: server/php-kolab/Kolab_Webadmin/Webadmin address.class.php, 1.3, 1.4 administrator.class.php, 1.3, 1.4 db.php, 1.1, 1.2 domainmaintainer.class.php, 1.4, 1.5 group.class.php, 1.4, 1.5 ldap.class.php, 1.9, 1.10 maintainer.class.php, 1.3, 1.4 object.php, 1.1, 1.2 sharedfolder.class.php, 1.4, 1.5 user.class.php, 1.6, 1.7 webadmin.class.php, 1.8, 1.9

cvs at kolab.org cvs at kolab.org
Wed Aug 22 15:25:02 CEST 2007


Author: gunnar

Update of /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin
In directory doto:/tmp/cvs-serv4988/Kolab_Webadmin/Webadmin

Modified Files:
	address.class.php administrator.class.php db.php 
	domainmaintainer.class.php group.class.php ldap.class.php 
	maintainer.class.php object.php sharedfolder.class.php 
	user.class.php webadmin.class.php 
Log Message:
A first set of trivial fixes to the draft version.

Index: address.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/address.class.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- address.class.php	22 Aug 2007 12:41:09 -0000	1.3
+++ address.class.php	22 Aug 2007 13:25:00 -0000	1.4
@@ -52,21 +52,21 @@
      *
      * @var string
      */
-    const filter = '(&(objectclass=inetOrgPerson)(!(uid=*))(sn=*))';
+    var $filter = '(&(objectclass=inetOrgPerson)(!(uid=*))(sn=*))';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_SN;
+    var $sort = KOLAB_ATTR_SN;
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_SN,
         KOLAB_ATTR_CN,
         KOLAB_ATTR_MAIL,

Index: administrator.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/administrator.class.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- administrator.class.php	22 Aug 2007 12:41:09 -0000	1.3
+++ administrator.class.php	22 Aug 2007 13:25:00 -0000	1.4
@@ -52,28 +52,28 @@
      *
      * @var string
      */
-    const filter = '(&(cn=*)(objectclass=inetOrgPerson)(uid=*)(sn=*))';
+    var $filter = '(&(cn=*)(objectclass=inetOrgPerson)(uid=*)(sn=*))';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_SN;
+    var $sort = KOLAB_ATTR_SN;
 
     /**
      * May this object log in to the Kolab system?
      *
      * @var boolean
      */
-    const login_allowed = true;
+    var $login_allowed = true;
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_SN,
         KOLAB_ATTR_CN,
         KOLAB_ATTR_UID,

Index: db.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/db.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- db.php	22 Aug 2007 12:41:09 -0000	1.1
+++ db.php	22 Aug 2007 13:25:00 -0000	1.2
@@ -73,7 +73,7 @@
      *
      * @var array
      */
-    const valid_types = array(
+    var $valid_types = array(
         KOLAB_OBJECT_ADDRESS,
         KOLAB_OBJECT_ADMINISTRATOR,
         KOLAB_OBJECT_DOMAINMAINTAINER,
@@ -132,7 +132,7 @@
      *
      * @return mixed An array of Kolab objects or a PEAR error
      */
-    function list($type, $base_dn = null, $addfilter = '', $perpage = 50, $page = 1)
+    function listObjects($type, $base_dn = null, $addfilter = '', $perpage = 50, $page = 1)
     {
         if (!in_array($type, $this->_valid_types)) {
             return PEAR::raiseError(sprintf(_("Invalid Kolab object type \"%s\"."), 
@@ -144,13 +144,14 @@
         }
 
         $class = 'Kolab' . $type;
+        $const = get_class_vars($class);
         if (!empty($addfilter)) {
-            $filter = $class::filter;
+            $filter = $const['filter'];
         } else {
-            $filter = '(&(' . $addfilter . ')(' . $class::filter . ')';
+            $filter = '(&(' . $addfilter . ')(' . $const['filter'] . ')';
         }
-        $attributes = $class::list_attributes;
-        $sort = $class::sort;
+        $attributes = $const['list_attributes'];
+        $sort = $const['sort'];
 
         $result = $this->_ldap->getPagedResult($base_dn, $filter, $attributes,
                                                $sort, $perpage, $page);
@@ -222,7 +223,7 @@
     function dnForAttr($attr, $value) {
         $filter = '(&(objectclass=kolabInetOrgPerson)(' . $attr . 
             '=' . $this->_ldap->escape($value) . '))';
-        $result = $this->_ldap->search($this->base_dn, $filter, array());
+        $result = $this->_ldap->search($this->_ldap->base_dn, $filter, array());
         if (is_a($result, 'PEAR_Error')) {
             return $result;
         }

Index: domainmaintainer.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/domainmaintainer.class.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- domainmaintainer.class.php	22 Aug 2007 12:41:09 -0000	1.4
+++ domainmaintainer.class.php	22 Aug 2007 13:25:00 -0000	1.5
@@ -51,28 +51,28 @@
      *
      * @var string
      */
-    const filter = '(&(cn=*)(objectclass=kolabInetOrgPerson)(!(uid=manager))(sn=*))';
+    var $filter = '(&(cn=*)(objectclass=kolabInetOrgPerson)(!(uid=manager))(sn=*))';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_SN;
+    var $sort = KOLAB_ATTR_SN;
 
     /**
      * May this object log in to the Kolab system?
      *
      * @var boolean
      */
-    const login_allowed = true;
+    var $login_allowed = true;
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_SN,
         KOLAB_ATTR_CN,
         KOLAB_ATTR_UID,

Index: group.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/group.class.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- group.class.php	22 Aug 2007 12:41:09 -0000	1.4
+++ group.class.php	22 Aug 2007 13:25:00 -0000	1.5
@@ -51,21 +51,21 @@
      *
      * @var string
      */
-    const filter = '(&(!(cn=domains))(objectclass=kolabGroupOfNames))';
+    var $filter = '(&(!(cn=domains))(objectclass=kolabGroupOfNames))';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_CN;
+    var $sort = KOLAB_ATTR_CN;
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_CN,
         KOLAB_ATTR_MAIL,
         KOLAB_ATTR_DELETED,

Index: ldap.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/ldap.class.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ldap.class.php	22 Aug 2007 12:41:09 -0000	1.9
+++ ldap.class.php	22 Aug 2007 13:25:00 -0000	1.10
@@ -406,7 +406,7 @@
      * @return array An array of object classes
      */
     function getObjectClasses($dn) {
-        $ldap_object = $this->_ldap->read($dn);
+        $ldap_object = $this->read($dn, array('objectClass'));
         if( !$ldap_object && $this->errno()) {
             return PEAR::raiseError(sprintf(_("LDAP Error: No such dn: %s: %s"), 
                                             $dn, $this->error()));

Index: maintainer.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/maintainer.class.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- maintainer.class.php	22 Aug 2007 12:41:09 -0000	1.3
+++ maintainer.class.php	22 Aug 2007 13:25:00 -0000	1.4
@@ -52,28 +52,28 @@
      *
      * @var string
      */
-    const filter = '(&(cn=*)(objectclass=inetOrgPerson)(!(uid=manager))(sn=*))';
+    var $filter = '(&(cn=*)(objectclass=inetOrgPerson)(!(uid=manager))(sn=*))';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_SN;
+    var $sort = KOLAB_ATTR_SN;
 
     /**
      * May this object log in to the Kolab system?
      *
      * @var boolean
      */
-    const login_allowed = true;
+    var $login_allowed = true;
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_SN,
         KOLAB_ATTR_CN,
         KOLAB_ATTR_UID,

Index: object.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/object.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- object.php	22 Aug 2007 12:41:09 -0000	1.1
+++ object.php	22 Aug 2007 13:25:00 -0000	1.2
@@ -76,42 +76,42 @@
      *
      * @var boolean
      */
-    const login_allowed = false;
+    var $login_allowed = false;
 
     /**
      * The LDAP filter to retrieve this object type
      *
      * @var string
      */
-    const filter = '';
+    var $filter = '';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = '';
+    var $sort = '';
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array();
+    var $list_attributes = array();
 
     /**
      * All LDAP attributes for this object
      *
      * @var array
      */
-    const all_attributes = array();
+    var $all_attributes = array();
 
     /**
      * The attributes supported by this class
      *
      * @var array
      */
-    var $_supported_attributes = array();
+    var $supported_attributes = array();
 
     /**
      * Initialize the Kolab Object. Provide either the DN or a

Index: sharedfolder.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/sharedfolder.class.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sharedfolder.class.php	22 Aug 2007 12:41:09 -0000	1.4
+++ sharedfolder.class.php	22 Aug 2007 13:25:00 -0000	1.5
@@ -52,21 +52,21 @@
      *
      * @var string
      */
-    const filter = '(objectclass=kolabSharedFolder)';
+    var $filter = '(objectclass=kolabSharedFolder)';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_CN;
+    var $sort = KOLAB_ATTR_CN;
 
     /**
      * The LDAP attributes fetched for listing
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_CN,
         KOLAB_ATTR_DELETED,
         'kolabFolderType',

Index: user.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/user.class.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- user.class.php	22 Aug 2007 12:41:09 -0000	1.6
+++ user.class.php	22 Aug 2007 13:25:00 -0000	1.7
@@ -52,21 +52,21 @@
      *
      * @var string
      */
-    const filter = '(&(objectclass=kolabInetOrgPerson)(uid=*)(mail=*)(sn=*))';
+    var $filter = '(&(objectclass=kolabInetOrgPerson)(uid=*)(mail=*)(sn=*))';
 
     /**
      * Sort using this attribute by default
      *
      * @var string
      */
-    const sort = KOLAB_ATTR_SN;
+    var $sort = KOLAB_ATTR_SN;
 
     /**
      * May this object log in to the Kolab system?
      *
      * @var boolean
      */
-    const login_allowed = true;
+    var $login_allowed = true;
 
     /**
      * The possible selections for invitation policies
@@ -99,7 +99,7 @@
      *
      * @var array
      */
-    const list_attributes = array(
+    var $list_attributes = array(
         KOLAB_ATTR_SN,
         KOLAB_ATTR_CN,
         KOLAB_ATTR_UID,

Index: webadmin.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/webadmin.class.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- webadmin.class.php	22 Aug 2007 12:41:09 -0000	1.8
+++ webadmin.class.php	22 Aug 2007 13:25:00 -0000	1.9
@@ -52,7 +52,7 @@
 require_once 'Kolab/Webadmin/form.class.php';
 
 /** Provides handling for the Kolab objects. */
-require_once 'Kolab/Webadmin/object.class.php';
+require_once 'Kolab/Webadmin/object.php';
 
 /**
  * This class combines methods common to most pages of the Kolab web
@@ -354,7 +354,7 @@
      */
     function hasGroup($groups)
     {
-        return (in_array($this->_user->group(), $groups);
+        return (in_array($this->_user->group(), $groups));
     }
 
     /**
@@ -521,9 +521,9 @@
         } else {
             $domainfilter = '';
         }
-        return $this->_db->list($type, null, $addfilter, 
-                                $this->_config['entries_per_page'],
-                                KolabForm::getRequestVar('page'));
+        return $this->_db->listObjects($type, null, $addfilter, 
+                                       $this->_config['entries_per_page'],
+                                       KolabForm::getRequestVar('page'));
     }
 
     /**





More information about the commits mailing list