No need to reinstantiate this on each iteration, do it once.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 7 Dec 2010 16:31:49 +0000 (11:31 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 8 Dec 2010 02:56:28 +0000 (21:56 -0500)
horde/services/twitter.php

index c60ab60..2fadd64 100644 (file)
@@ -71,6 +71,9 @@ case 'getPage':
         $newest = $params['since_id'];
         $oldest = 0;
     }
+
+    $view = new Horde_View(array('templatePath' => HORDE_TEMPLATES . '/block'));
+    $view->addHelper('Tag');
     foreach ($stream as $tweet) {
 
         /* Don't return the max_id tweet, since we already have it */
@@ -78,9 +81,6 @@ case 'getPage':
             continue;
         }
 
-        $view = new Horde_View(array('templatePath' => HORDE_TEMPLATES . '/block'));
-        $view->addHelper('Tag');
-
         $filter = $injector->getInstance('Horde_Core_Factory_TextFilter');
 
          /* links */