]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ExtendedProfile/actions/profiledetail.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / ExtendedProfile / actions / profiledetail.php
index a777a28e031cacbab9a47b2335fc97ad12c689da..272dfbb53fa8e6e98991366ee22d41d8e6f10c64 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 class ProfileDetailAction extends ShowstreamAction
 {
-
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
 
     function title()
     {
-        return $this->profile->getFancyName();
+        return $this->target->getFancyName();
     }
 
     function showStylesheets() {
@@ -43,7 +40,7 @@ class ProfileDetailAction extends ShowstreamAction
     function showContent()
     {
         $cur = common_current_user();
-        if ($cur && $cur->id == $this->profile->id) { // your own page
+        if ($this->scoped instanceof Profile && $this->scoped->sameAs($this->target)) {
             $this->elementStart('div', 'entity_actions');
             $this->elementStart('ul');
             $this->elementStart('li', 'entity_edit');
@@ -57,7 +54,7 @@ class ProfileDetailAction extends ShowstreamAction
             $this->elementEnd('div');
         }
 
-        $widget = new ExtendedProfileWidget($this, $this->profile);
+        $widget = new ExtendedProfileWidget($this, $this->target);
         $widget->show();
     }
 }