]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/widget.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / lib / widget.php
index 78472dd4d8d557594df45b8c84f6eff235898abf..227fe0ccee2d0fb6c1d70d4f04ae6ce5898605ec 100644 (file)
@@ -28,9 +28,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Base class for UI widgets
@@ -54,7 +52,7 @@ class Widget
     protected $avatarSize = AVATAR_STREAM_SIZE;
 
     /**
-     * HTMLOutputter to use for output
+     * Action (HTMLOutputter) to use for output
      */
 
     var $out = null;
@@ -62,12 +60,16 @@ class Widget
     /**
      * Prepare the widget for use
      *
-     * @param HTMLOutputter $out output helper, defaults to null
+     * @param Action $out output helper, defaults to null
      */
 
-    function __construct(HTMLOutputter $out=null)
+    function __construct(Action $out=null, array $widgetOpts=array())
     {
         $this->out = $out;
+        if (!array_key_exists('scoped', $widgetOpts)) {
+            $this->widgetOpts['scoped'] = Profile::current();
+        }
+        $this->scoped = $this->widgetOpts['scoped'];
     }
 
     /**