"private" -> "personal"
authorGunnar Wrobel <p@rdus.de>
Tue, 23 Mar 2010 05:55:54 +0000 (06:55 +0100)
committerGunnar Wrobel <wrobel@temple.(none)>
Tue, 23 Mar 2010 06:53:33 +0000 (07:53 +0100)
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Folder.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Other.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Personal.php [new file with mode: 0644]
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Private.php [deleted file]
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Shared.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Fixed.php
framework/Kolab_Storage/package.xml
framework/Kolab_Storage/test/Horde/Kolab/Storage/NamespaceTest.php

index d3ed639..235e648 100644 (file)
@@ -486,7 +486,7 @@ class Horde_Kolab_Storage_Folder
              * rather than in a module nearer to the applications.
              */
             switch ($owner) {
-            case Horde_Kolab_Storage_Namespace::PRIV:
+            case Horde_Kolab_Storage_Namespace::PERSONAL:
                 $this->_owner = Horde_Auth::getAuth();
                 break;
             case Horde_Kolab_Storage_Namespace::SHARED:
index 4908a89..639c71a 100644 (file)
@@ -30,9 +30,9 @@
 abstract class Horde_Kolab_Storage_Namespace
 {
     /** The possible namespace types (RFC 2342 [5]) */
-    const PRIV   = 'private';
-    const OTHER  = 'other';
-    const SHARED = 'shared';
+    const PERSONAL = 'personal';
+    const OTHER    = 'other';
+    const SHARED   = 'shared';
 
     /**
      * The namespaces.
@@ -78,18 +78,18 @@ abstract class Horde_Kolab_Storage_Namespace
     {
         $this->_charset = Horde_Nls::getCharset();
         if (empty($this->_primaryPersonalNamespace)) {
-            $priv = null;
+            $personal = null;
             foreach ($this->_namespaces as $namespace) {
                 if ($namespace->getName() == 'INBOX') {
                     $this->_primaryPersonalNamespace = $namespace;
                     break;
                 }
-                if (empty($priv) && $namespace->getType() == self::PRIV) {
-                    $priv = $namespace;
+                if (empty($personal) && $namespace->getType() == self::PERSONAL) {
+                    $personal = $namespace;
                 }
             }
             if (empty($this->_primaryPersonalNamespace)) {
-                $this->_primaryPersonalNamespace = $priv;
+                $this->_primaryPersonalNamespace = $personal;
             }
         }
     }
index 6f717bc..1bbba5a 100644 (file)
@@ -29,7 +29,7 @@ abstract class Horde_Kolab_Storage_Namespace_Element
     }
 
     /**
-     * Return the type of this namespace (private, other, or shared).
+     * Return the type of this namespace (personal, other, or shared).
      *
      * @return string The type.
      */
index 583e534..5aa932d 100644 (file)
@@ -4,7 +4,7 @@ class Horde_Kolab_Storage_Namespace_Element_Other
 extends Horde_Kolab_Storage_Namespace_Element
 {
     /**
-     * Return the type of this namespace (private, other, or shared).
+     * Return the type of this namespace (personal, other, or shared).
      *
      * @return string The type.
      */
diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Personal.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Personal.php
new file mode 100644 (file)
index 0000000..a0f3686
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+class Horde_Kolab_Storage_Namespace_Element_Personal
+extends Horde_Kolab_Storage_Namespace_Element
+{
+    /**
+     * Return the type of this namespace (personal, other, or shared).
+     *
+     * @return string The type.
+     */
+    public function getType()
+    {
+        return Horde_Kolab_Storage_Namespace::PERSONAL;
+    }
+
+    /**
+     * Return the owner of a folder.
+     *
+     * @param string $name The name of the folder.
+     *
+     * @return string The owner of the folder.
+     */
+    public function getOwner($name)
+    {
+        return Horde_Kolab_Storage_Namespace::PERSONAL;
+    }
+}
\ No newline at end of file
diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Private.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Namespace/Element/Private.php
deleted file mode 100644 (file)
index cae23d6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class Horde_Kolab_Storage_Namespace_Element_Private
-extends Horde_Kolab_Storage_Namespace_Element
-{
-    /**
-     * Return the type of this namespace (private, other, or shared).
-     *
-     * @return string The type.
-     */
-    public function getType()
-    {
-        return Horde_Kolab_Storage_Namespace::PRIV;
-    }
-
-    /**
-     * Return the owner of a folder.
-     *
-     * @param string $name The name of the folder.
-     *
-     * @return string The owner of the folder.
-     */
-    public function getOwner($name)
-    {
-        return Horde_Kolab_Storage_Namespace::PRIV;
-    }
-}
\ No newline at end of file
index 9d766aa..8e63f21 100644 (file)
@@ -4,7 +4,7 @@ class Horde_Kolab_Storage_Namespace_Element_Shared
 extends Horde_Kolab_Storage_Namespace_Element
 {
     /**
-     * Return the type of this namespace (private, other, or shared).
+     * Return the type of this namespace (personal, other, or shared).
      *
      * @return string The type.
      */
index ce9558b..6867d87 100644 (file)
@@ -45,13 +45,13 @@ extends  Horde_Kolab_Storage_Namespace
     {
         parent::__construct();
 
-        $priv = new Horde_Kolab_Storage_Namespace_Element_Private('INBOX', '/');
-        $other = new Horde_Kolab_Storage_Namespace_Element_Other('user', '/');
-        $shared = new Horde_Kolab_Storage_Namespace_Element_SharedWithPrefix('', '/', 'shared.');
+        $personal = new Horde_Kolab_Storage_Namespace_Element_Personal('INBOX', '/');
+        $other    = new Horde_Kolab_Storage_Namespace_Element_Other('user', '/');
+        $shared   = new Horde_Kolab_Storage_Namespace_Element_SharedWithPrefix('', '/', 'shared.');
 
-        $this->_namespaces = array($priv, $other);
+        $this->_namespaces = array($personal, $other);
         $this->_any = $shared;
-        $this->_primaryPersonalNamespace = $priv;
+        $this->_primaryPersonalNamespace = $personal;
         $this->_sharedPrefix = 'shared.';
     }
 }
\ No newline at end of file
index 3d71c9a..2710aaa 100644 (file)
@@ -85,7 +85,7 @@
         <file name="Element.php" role="php" />
         <dir name="Element">
          <file name="Other.php" role="php" />
-         <file name="Private.php" role="php" />
+         <file name="Personal.php" role="php" />
          <file name="Shared.php" role="php" />
          <file name="SharedWithPrefix.php" role="php" />
         </dir> <!-- /lib/Horde/Kolab/Storage/Element -->
    <install as="Horde/Kolab/Storage/Namespace/Config.php" name="lib/Horde/Kolab/Storage/Namespace/Config.php" />
    <install as="Horde/Kolab/Storage/Namespace/Element.php" name="lib/Horde/Kolab/Storage/Namespace/Element.php" />
    <install as="Horde/Kolab/Storage/Namespace/Element/Other.php" name="lib/Horde/Kolab/Storage/Namespace/Element/Other.php" />
-   <install as="Horde/Kolab/Storage/Namespace/Element/Private.php" name="lib/Horde/Kolab/Storage/Namespace/Element/Private.php" />
+   <install as="Horde/Kolab/Storage/Namespace/Element/Personal.php" name="lib/Horde/Kolab/Storage/Namespace/Element/Personal.php" />
    <install as="Horde/Kolab/Storage/Namespace/Element/Shared.php" name="lib/Horde/Kolab/Storage/Namespace/Element/Shared.php" />
    <install as="Horde/Kolab/Storage/Namespace/Element/SharedWithPrefix.php" name="lib/Horde/Kolab/Storage/Namespace/Element/SharedWithPrefix.php" />
    <install as="Horde/Kolab/Storage/Namespace/Fixed.php" name="lib/Horde/Kolab/Storage/Namespace/Fixed.php" />
index 921321e..c3b23ed 100644 (file)
@@ -38,7 +38,7 @@ class Horde_Kolab_Storage_NamespaceTest extends PHPUnit_Framework_TestCase
         $this->_connection = $this->getMock('Horde_Kolab_Storage_Driver');
     }
 
-    public function testFolderTitleIsEmptyForPrivateNamespace()
+    public function testFolderTitleIsEmptyForPersonalNamespace()
     {
         foreach ($this->_getNamespaces() as $namespace) {
             $folder = new Horde_Kolab_Storage_Folder('INBOX');
@@ -47,7 +47,7 @@ class Horde_Kolab_Storage_NamespaceTest extends PHPUnit_Framework_TestCase
         }
     }
 
-    public function testFolderTitleDoesNotContainPrivateNamespace()
+    public function testFolderTitleDoesNotContainPersonalNamespace()
     {
         foreach ($this->_getNamespaces() as $namespace) {
             $folder = new Horde_Kolab_Storage_Folder('INBOX/test');
@@ -96,7 +96,7 @@ class Horde_Kolab_Storage_NamespaceTest extends PHPUnit_Framework_TestCase
         }
     }
 
-    public function testFolderOwnerIsCurrentUserIfPrefixMatchesPrivateNamespace()
+    public function testFolderOwnerIsCurrentUserIfPrefixMatchesPersonalNamespace()
     {
         foreach ($this->_getNamespaces() as $namespace) {
             $_SESSION['horde_auth']['userId'] = 'test';
@@ -106,7 +106,7 @@ class Horde_Kolab_Storage_NamespaceTest extends PHPUnit_Framework_TestCase
         }
     }
 
-    public function testFolderOwnerIsCurrentUserIfPrefixContainsPrivateNamespace()
+    public function testFolderOwnerIsCurrentUserIfPrefixContainsPersonalNamespace()
     {
         foreach ($this->_getNamespaces() as $namespace) {
             $_SESSION['horde_auth']['userId'] = 'test';
@@ -271,7 +271,7 @@ class Horde_Kolab_Storage_NamespaceTest extends PHPUnit_Framework_TestCase
             new Horde_Kolab_Storage_Namespace_Config(
                 array(
                     array(
-                        'type' => Horde_Kolab_Storage_Namespace::PRIV,
+                        'type' => Horde_Kolab_Storage_Namespace::PERSONAL,
                         'name' => 'INBOX',
                         'delimiter' => '/',
                         'add' => true,
@@ -293,7 +293,7 @@ class Horde_Kolab_Storage_NamespaceTest extends PHPUnit_Framework_TestCase
                 array(
                     array(
                         'name'      => 'INBOX',
-                        'type'      =>  Horde_Kolab_Storage_Namespace::PRIV,
+                        'type'      =>  Horde_Kolab_Storage_Namespace::PERSONAL,
                         'delimiter' => '/',
                     ),
                     array(