Use new Horde_Registry::pushApp() API.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Jul 2009 19:09:04 +0000 (13:09 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Jul 2009 19:24:34 +0000 (13:24 -0600)
19 files changed:
babel/lib/base.php
chora/lib/base.php
crumb/lib/base.php
fima/lib/base.php
folks/lib/base.php
imp/lib/base.php
ingo/lib/base.php
jeta/lib/base.php
kastalia/download.php
kastalia/lib/base.php
kronolith/lib/base.php
news/lib/base.php
skoli/lib/base.php
timeobjects/lib/base.php
turba/lib/base.php
turba/lib/tests/ApiTest.php
turba/lib/tests/BrowsePageTest.php
turba/lib/tests/KolabTestBase.php
turba/lib/tests/ViewBrowseTest.php

index bff2c7e..b47384f 100644 (file)
@@ -30,7 +30,7 @@ $notification->attach('status');
 $registry = Horde_Registry::singleton();
 
 try {
-    $registry->pushApp('babel', true);
+    $registry->pushApp('babel', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('babel', $e);
 }
index 751e7bc..23b4c7e 100644 (file)
@@ -32,7 +32,7 @@ require_once HORDE_BASE . '/lib/core.php';
 // Registry
 $registry = Horde_Registry::singleton();
 try {
-    $registry->pushApp('chora', true);
+    $registry->pushApp('chora', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('chora', $e);
 }
index f1647da..e0585ea 100644 (file)
@@ -22,7 +22,7 @@ require_once HORDE_BASE . '/lib/core.php';
 // Registry.
 $registry = Horde_Registry::singleton();
 try {
-    $registry->pushApp('crumb', true);
+    $registry->pushApp('crumb', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('crumb', $e);
 }
index 8dbe7a0..a44a142 100644 (file)
@@ -28,7 +28,7 @@ if ($session_control == 'none') {
 }
 
 try {
-    $registry->pushApp('fima', true);
+    $registry->pushApp('fima', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('fima', $e);
 }
index 0fd1cd1..31ab558 100644 (file)
@@ -19,9 +19,8 @@ require_once HORDE_BASE . '/lib/core.php';
 
 // Registry.
 $registry = Horde_Registry::singleton();
-$authentication = Horde_Util::nonInputVar('folks_authentication');
 try {
-    $registry->pushApp('folks', ($authentication != 'none'));
+    $registry->pushApp('folks', array('check_perms' => (Horde_Util::nonInputVar('folks_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('folks', $e);
 }
index 56adfa2..0fa5995 100644 (file)
@@ -78,7 +78,7 @@ if ($authentication == 'horde') {
 }
 
 try {
-    $registry->pushApp('imp', ($authentication != 'none'));
+    $registry->pushApp('imp', array('check_perms' => ($authentication != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     if ($e->getCode() == Horde_Registry::AUTH_FAILURE) {
         if ($authentication == 'throw') {
index 8332ebc..c29eaf3 100644 (file)
@@ -28,9 +28,8 @@ require_once HORDE_BASE . '/lib/core.php';
 
 // Registry.
 $registry = Horde_Registry::singleton();
-$authentication = Horde_Util::nonInputVar('ingo_authentication');
 try {
-    $registry->pushApp('ingo', ($authentication != 'none'));
+    $registry->pushApp('ingo', array('check_perms' => (Horde_Util::nonInputVar('ingo_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('ingo', $e);
 }
index 9a6dfa6..bafb2ad 100644 (file)
@@ -20,7 +20,7 @@ require_once HORDE_BASE . '/lib/core.php';
 // Registry.
 $registry = Horde_Registry::singleton();
 try {
-    $registry->pushApp('jeta', true);
+    $registry->pushApp('jeta', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('jeta', $e);
 }
index df41b9a..85cef16 100755 (executable)
@@ -32,7 +32,7 @@ require_once HORDE_BASE . '/lib/core.php';
 // Registry.
 $registry = Horde_Registry::singleton();
 try {
-    $registry->pushApp('kastalia', true);
+    $registry->pushApp('kastalia', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('kastalia', $e);
 }
index 0f9d5a6..1317f19 100755 (executable)
@@ -22,7 +22,7 @@ require_once HORDE_BASE . '/lib/core.php';
 // Registry.
 $registry = Horde_Registry::singleton();
 try {
-    $registry->pushApp('kastalia', true);
+    $registry->pushApp('kastalia', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('kastalia', $e);
 }
index 57aa889..5e40d59 100644 (file)
@@ -38,9 +38,8 @@ case 'readonly':
 }
 $registry = Horde_Registry::singleton($s_ctrl);
 
-$authentication = Horde_Util::nonInputVar('kronolith_authentication');
 try {
-    $registry->pushApp('kronolith', ($authentication != 'none'));
+    $registry->pushApp('kronolith', array('check_perms' => (Horde_Util::nonInputVar('kronolith_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('kronolith', $e);
 }
index 51c640a..7dd89b7 100644 (file)
@@ -24,9 +24,8 @@ require_once HORDE_BASE . '/lib/core.php';
 
 // Registry.
 $registry = Horde_Registry::singleton();
-$authentication = Horde_Util::nonInputVar('news_authentication');
 try {
-    $registry->pushApp('news', ($authentication != 'none'));
+    $registry->pushApp('news', array('check_perms' => (Horde_Util::nonInputVar('news_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('news', $e);
 }
index 2be1d35..7e9de93 100644 (file)
@@ -19,9 +19,8 @@ require_once HORDE_BASE . '/lib/core.php';
 
 // Registry.
 $registry = Horde_Registry::singleton();
-$authentication = Horde_Util::nonInputVar('skoli_authentication');
 try {
-    $registry->pushApp('skoli', ($authentication != 'none'));
+    $registry->pushApp('skoli', array('check_perms' => (Horde_Util::nonInputVar('skoli_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('skoli', $e);
 }
index 6aef933..4ecc30d 100644 (file)
@@ -31,7 +31,7 @@ if ($session_control == 'none') {
 }
 
 try {
-    $registry->pushApp('timeobjects', true);
+    $registry->pushApp('timeobjects', array('logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('timeobjects', $e);
 }
index b669082..33b61d3 100644 (file)
@@ -21,9 +21,8 @@ require_once HORDE_BASE . '/lib/core.php';
 
 // Registry.
 $registry = Horde_Registry::singleton();
-$authentication = Horde_Util::nonInputVar('turba_authentication');
 try {
-    $registry->pushApp('turba', ($authentication != 'none'));
+    $registry->pushApp('turba', array('check_perms' => (Horde_Util::nonInputVar('turba_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
     Horde_Auth::authenticationFailureRedirect('turba', $e);
 }
index e33cf2b..144ff7e 100644 (file)
@@ -23,7 +23,7 @@ class Turba_ApiTest extends Turba_TestBase {
         /* HACK: ensure we've included this so that it won't get included
          * again, then override the globals it provides. */
         try {
-            $pushed = $registry->pushApp('turba', false);
+            $pushed = $registry->pushApp('turba', array('check_perms' => false));
         } catch (Horde_Exception $e) {
             return;
         }
index e6d5d96..fa3ae37 100644 (file)
@@ -57,7 +57,7 @@ class Turba_BrowsePageTest extends Turba_TestBase {
 
     function getPage()
     {
-        $this->_pageParams['registry']->pushApp('turba', false);
+        $this->_pageParams['registry']->pushApp('turba', array('check_perms' => false));
         $this->fakeAuth();
         $page = new Turba_BrowsePage($this->_pageParams);
         $this->_output = Horde_Util::bufferOutput(array($page, 'run'));
index 44d17aa..74cd643 100644 (file)
@@ -140,15 +140,10 @@ class Turba_KolabTestBase extends Horde_Kolab_Test_Storage
         $this->assertTrue($world['auth']->authenticate('wrobel@example.org',
                                                        array('password' => 'none')));
 
-        // TODO: Disable maintenance
-        $GLOBALS['registry']->pushApp('turba');
-
-        // Find the base file path of Turba.
-        if (!defined('TURBA_BASE')) {
-            define('TURBA_BASE', dirname(__FILE__) . '/../..');
-        }
+        $GLOBALS['registry']->pushApp('turba', array('check_perms' => false));
 
         // Turba base libraries.
+        require_once dirname(__FILE__) . '/../../lib/base.load.php';
         require_once TURBA_BASE . '/lib/Turba.php';
         require_once TURBA_BASE . '/lib/Driver.php';
         require_once TURBA_BASE . '/lib/Object.php';
@@ -167,12 +162,12 @@ class Turba_KolabTestBase extends Horde_Kolab_Test_Storage
         $GLOBALS['cfgSources'] = Turba::getConfigFromShares($cfgSources);
     }
 
-
     function provideServerName() {
         return 'localhost.localdomain';
     }
 
     function provideHordeBase() {
-        return dirname(__FILE__) . '/../../../';
+        require_once dirname(__FILE__) . '/../../lib/base.load.php';
+        return HORDE_BASE;
     }
 }
index 204e49f..596017d 100644 (file)
@@ -58,7 +58,7 @@ class Turba_ViewBrowseTest extends Turba_TestBase {
 
     function getPage()
     {
-        $this->_pageParams['registry']->pushApp('turba', false);
+        $this->_pageParams['registry']->pushApp('turba', array('check_perms' => false));
         $this->fakeAuth();
         $page = new Turba_View_Browse($this->_pageParams);
         $this->_output = Horde_Util::bufferOutput(array($page, 'run'));