Update IMP blocks to PHP 5 format
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Dec 2009 02:25:34 +0000 (19:25 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Dec 2009 02:25:34 +0000 (19:25 -0700)
imp/lib/Block/Foldersummary.php
imp/lib/Block/Newmail.php
imp/lib/Block/summary.php
imp/lib/Block/tree_folders.php

index e5325b0..69bb775 100644 (file)
 
 class IMP_Block_Foldersummary extends Horde_Block
 {
-    var $_app = 'imp';
+    protected $_app = 'imp';
 
-    function _content()
+    protected function _content()
     {
-        require_once dirname(__FILE__) . '/../Application.php';
         try {
             new IMP_Application(array('init' => array('authentication' => 'throw')));
         } catch (Horde_Exception $e) {
index 03269aa..42e930b 100644 (file)
  */
 class IMP_Block_Newmail extends Horde_Block
 {
-    var $_app = 'imp';
+    protected $_app = 'imp';
 
-    function _content()
+    protected function _content()
     {
-        require_once dirname(__FILE__) . '/../Application.php';
         try {
             new IMP_Application(array('init' => array('authentication' => 'throw')));
         } catch (Horde_Exception $e) {
index bf2bbf7..7fc03a9 100644 (file)
@@ -12,19 +12,15 @@ $block_name = _("Folder Summary");
 
 class Horde_Block_imp_summary extends Horde_Block
 {
-    /**
-     * Whether this block has changing content.
-     */
-    var $updateable = true;
+    public $updateable = true;
+    protected $_app = 'imp';
 
-    var $_app = 'imp';
-
-    function _title()
+    protected function _title()
     {
         return Horde::link(Horde::url($GLOBALS['registry']->getInitialPage(), true)) . $GLOBALS['registry']->get('name') . '</a>';
     }
 
-    function _params()
+    protected function _params()
     {
         return array('show_unread' => array('type' => 'boolean',
                                             'name' => _("Only display folders with unread messages in them?"),
@@ -35,11 +31,10 @@ class Horde_Block_imp_summary extends Horde_Block
                      );
     }
 
-    function _content()
+    protected function _content()
     {
         global $notification, $prefs, $registry;
 
-        require_once dirname(__FILE__) . '/../Application.php';
         try {
             new IMP_Application(array('init' => array('authentication' => 'throw')));
         } catch (Horde_Exception $e) {
index 3f97613..687e080 100644 (file)
@@ -13,11 +13,10 @@ $block_type = 'tree';
 
 class Horde_Block_imp_tree_folders extends Horde_Block
 {
-    var $_app = 'imp';
+    protected $_app = 'imp';
 
-    function _buildTree(&$tree, $indent = 0, $parent = null)
+    protected function _buildTree(&$tree, $indent = 0, $parent = null)
     {
-        require_once dirname(__FILE__) . '/../Application.php';
         try {
             new IMP_Application(array('init' => array('authentication' => 'throw')));
         } catch (Horde_Exception $e) {