* 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:
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.
{
$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;
}
}
}
}
/**
- * Return the type of this namespace (private, other, or shared).
+ * Return the type of this namespace (personal, other, or shared).
*
* @return string The type.
*/
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.
*/
--- /dev/null
+<?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
+++ /dev/null
-<?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
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.
*/
{
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
<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" />
$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');
}
}
- public function testFolderTitleDoesNotContainPrivateNamespace()
+ public function testFolderTitleDoesNotContainPersonalNamespace()
{
foreach ($this->_getNamespaces() as $namespace) {
$folder = new Horde_Kolab_Storage_Folder('INBOX/test');
}
}
- public function testFolderOwnerIsCurrentUserIfPrefixMatchesPrivateNamespace()
+ public function testFolderOwnerIsCurrentUserIfPrefixMatchesPersonalNamespace()
{
foreach ($this->_getNamespaces() as $namespace) {
$_SESSION['horde_auth']['userId'] = 'test';
}
}
- public function testFolderOwnerIsCurrentUserIfPrefixContainsPrivateNamespace()
+ public function testFolderOwnerIsCurrentUserIfPrefixContainsPersonalNamespace()
{
foreach ($this->_getNamespaces() as $namespace) {
$_SESSION['horde_auth']['userId'] = 'test';
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,
array(
array(
'name' => 'INBOX',
- 'type' => Horde_Kolab_Storage_Namespace::PRIV,
+ 'type' => Horde_Kolab_Storage_Namespace::PERSONAL,
'delimiter' => '/',
),
array(