{
$scope = $this->_injector->getInstance('Ansel_Config')->get('scope');
if (empty($this->_instances[$scope])) {
- $this->_instances[$scope] = new Ansel_Storage($this->_injector->getInstance('Horde_Share')->getScope($scope, 'Sql_Hierarchical'));
+ $this->_instances[$scope] = new Ansel_Storage($this->_injector->getInstance('Horde_Share_Factory')->getScope($scope, 'Sql_Hierarchical'));
}
return $this->_instances[$scope];
$registry->setTimeZone();
// Create a share instance.
-$GLOBALS['fima_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+$GLOBALS['fima_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
Fima::initialize();
// Delete groups
if ($GLOBALS['conf']['friends']) {
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$groups = $shares->listShares($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, true);
foreach ($groups as $share) {
$result = $shares->removeShare($share);
*/
public function getGroupOwner($group)
{
- $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
try {
$share = $GLOBALS['folks_shares']->getShareById($group);
*/
protected function _getGroups()
{
- $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$groups = $GLOBALS['folks_shares']->listShares($this->_user, Horde_Perms::READ);
$list = array();
return PEAR::raiseError(_("A group names cannot be empty"));
}
- $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$share = $GLOBALS['folks_shares']->getShareById($group);
// Only owners of a group can delete them
*/
public function removeGroup($group)
{
- $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$share = $GLOBALS['folks_shares']->getShareById($group);
if ($share instanceof PEAR_Error) {
return PEAR::raiseError(sprintf(_("You already have a group named \"%s\"."), $name));
}
- $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['folks_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$share = $GLOBALS['folks_shares']->newShare(strval(new Horde_Support_Uuid()));
require_once dirname(__FILE__) . '/lib/base.php';
-$shares = $injector->getInstance('Horde_Share')->getScope();
+$shares = $injector->getInstance('Horde_Share_Factory')->getScope();
$groups = $injector->getInstance('Horde_Group');
$auth = $injector->getInstance('Horde_Auth')->getAuth();
+++ /dev/null
-<?php
-/**
- * @category Horde
- * @package Core
- */
-class Horde_Core_Binder_Share implements Horde_Injector_Binder
-{
- public function create(Horde_Injector $injector)
- {
- return new Horde_Core_Factory_Share($injector);
- }
-
- public function equals(Horde_Injector_Binder $binder)
- {
- return false;
- }
-
-}
--- /dev/null
+<?php
+/**
+ * @category Horde
+ * @package Core
+ */
+class Horde_Core_Binder_ShareFactory implements Horde_Injector_Binder
+{
+ public function create(Horde_Injector $injector)
+ {
+ return new Horde_Core_Factory_Share($injector);
+ }
+
+ public function equals(Horde_Injector_Binder $binder)
+ {
+ return false;
+ }
+
+}
'Horde_Service_Facebook' => 'Horde_Core_Binder_Facebook',
'Horde_Service_Twitter' => 'Horde_Core_Binder_Twitter',
'Horde_SessionHandler' => 'Horde_Core_Binder_SessionHandler',
- 'Horde_Share' => 'Horde_Core_Binder_Share',
+ 'Horde_Share_Factory' => 'Horde_Core_Binder_ShareFactory',
'Horde_Template' => 'Horde_Core_Binder_Template',
'Horde_Text_Filter' => 'Horde_Core_Binder_TextFilter',
'Horde_Tree' => 'Horde_Core_Binder_Tree',
<file name="Prefs.php" role="php" />
<file name="Secret.php" role="php" />
<file name="SessionHandler.php" role="php" />
- <file name="Share.php" role="php" />
+ <file name="ShareFactory.php" role="php" />
<file name="Template.php" role="php" />
<file name="TextFilter.php" role="php" />
<file name="Token.php" role="php" />
<install as="Horde/Core/Binder/Prefs.php" name="lib/Horde/Core/Binder/Prefs.php" />
<install as="Horde/Core/Binder/Secret.php" name="lib/Horde/Core/Binder/Secret.php" />
<install as="Horde/Core/Binder/SessionHandler.php" name="lib/Horde/Core/Binder/SessionHandler.php" />
- <install as="Horde/Core/Binder/Share.php" name="lib/Horde/Core/Binder/Share.php" />
+ <install as="Horde/Core/Binder/ShareFactory.php" name="lib/Horde/Core/Binder/ShareFactory.php" />
<install as="Horde/Core/Binder/Template.php" name="lib/Horde/Core/Binder/Template.php" />
<install as="Horde/Core/Binder/TextFilter.php" name="lib/Horde/Core/Binder/TextFilter.php" />
<install as="Horde/Core/Binder/Tree.php" name="lib/Horde/Core/Binder/Tree.php" />
if ($source['use_shares']) {
if (empty($contact_shares)) {
$scope = $GLOBALS['registry']->hasInterface('contacts');
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
$this->_contact_shares = $shares->listShares($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, $GLOBALS['registry']->getAuth());
}
// Contruct a list of owner ids to use
$folder->setACL($arguments[0], 'alrid');
break;
case 'retrieving the list of shares for the application':
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($arguments[0], 'kolab');
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($arguments[0], 'kolab');
$world['list'] = $shares->listShares(Auth::getAuth());
break;
return;
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope('h-prefs');
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope('h-prefs');
$default = $shares->getDefaultShare();
if ($default instanceof PEAR_Error) {
if ($this->_opts['logger']) {
throw new Horde_Exception(_("You are not allowed to add shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->newShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exceptionr(_("You are not allowed to delete shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exception(_("You are not allowed to list shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
$share_list = &$shares->listShares($userName, Horde_Perms::SHOW, $userName);
$myshares = array();
throw new Horde_Exception(_("You are not allowed to change shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exception(_("You are not allowed to change shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exception(_("You are not allowed to change shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exception(_("You are not allowed to change shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
Horde_Perms::EDIT => 'edit',
Horde_Perms::DELETE => 'delete');
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
Horde_Perms::EDIT => 'edit',
Horde_Perms::DELETE => 'delete');
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exception(_("You are not allowed to list users of shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
throw new Horde_Exception(_("You are not allowed to list groups of shares."));
}
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope($scope);
if (is_a($share = &$shares->getShare($shareName), 'PEAR_Error')) {
throw new Horde_Exception($share);
);
$app = Horde_Util::getFormData('app');
-$shares = $injector->getInstance('Horde_Share')->getScope($app);
+$shares = $injector->getInstance('Horde_Share_Factory')->getScope($app);
$groups = $injector->getInstance('Horde_Group');
$auth = $injector->getInstance('Horde_Auth')->getAuth();
$help = $registry->hasMethod('shareHelp', $app)
// Create shares if necessary.
$transport = Ingo::getTransport();
if ($transport->supportShares()) {
- $GLOBALS['ingo_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['ingo_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$GLOBALS['all_rulesets'] = Ingo::listRulesets();
/* If personal share doesn't exist then create it. */
$GLOBALS['registry']->setTimeZone();
/* Create a share instance. */
- $GLOBALS['kronolith_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['kronolith_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
Kronolith::initialize();
}
throw new Horde_Exception('Permission denied.');
}
-$shares = $injector->getInstance('Horde_Share')->getScope();
+$shares = $injector->getInstance('Horde_Share_Factory')->getScope();
$groups = $injector->getInstance('Horde_Group');
$auth = $injector->getInstance('Horde_Auth')->getAuth();
$fgcolors = $cManager->fgColors();
if (!empty($this->_params['show_notepad'])) {
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
}
$html = '';
*/
public static function initialize()
{
- $GLOBALS['mnemo_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['mnemo_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
// Update the preference for which notepads to display. If the
// user doesn't have any selected notepads for view then fall
$GLOBALS['registry']->setTimeZone();
// Create a share instance.
- $GLOBALS['nag_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['nag_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
Nag::initialize();
}
if (!empty($this->_params['show_tasklist'])) {
$owner = $task->tasklist;
- $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$share = $shares->getShare($owner);
$owner = $share->get('name');
$html .= '<td width="1%" class="nowrap">'
Horde::compressOutput();
// Create a share instance.
-$GLOBALS['skoli_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+$GLOBALS['skoli_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
Skoli::initialize();
if (!empty($cfg['use_shares'])) {
// Create a share instance.
$_SESSION['turba']['has_share'] = true;
- $GLOBALS['turba_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['turba_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$cfgSources = Turba::getConfigFromShares($cfgSources);
break;
}
$this->prepareNewFolder($world['storage'], 'test2', 'contact');
$_SESSION['turba']['has_share'] = true;
- $GLOBALS['turba_shares'] = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $GLOBALS['turba_shares'] = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$GLOBALS['cfgSources'] = Turba::getConfigFromShares($cfgSources);
}
if ($handle instanceof PEAR_Error) {
$cli->fatal($handle->toString());
}
-$turba_shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+$turba_shares = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
$user = null;
$count = 0;
while ($row = $handle->fetchRow(DB_FETCHMODE_ASSOC)) {
*/
function Whups_QueryManager()
{
- $this->_shareManager = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
+ $this->_shareManager = $GLOBALS['injector']->getInstance('Horde_Share_Factory')->getScope();
}
/**