]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/widget.php
NoAcctUriException->profile not $e directly
[quix0rs-gnu-social.git] / lib / widget.php
index 1ccd1e252b2f74344d60742f058a2858adb1f668..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
@@ -65,9 +63,13 @@ class Widget
      * @param Action $out output helper, defaults to null
      */
 
-    function __construct(Action $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'];
     }
 
     /**