forked from GNUsocial/gnu-social
		
	move OMB-specific remote login button to OMB Plugin
This commit is contained in:
		@@ -138,9 +138,6 @@ class AccountProfileBlock extends ProfileBlock
 | 
				
			|||||||
            if (Event::handle('StartProfilePageActionsElements', array($this->out, $this->profile))) {
 | 
					            if (Event::handle('StartProfilePageActionsElements', array($this->out, $this->profile))) {
 | 
				
			||||||
                if (empty($cur)) { // not logged in
 | 
					                if (empty($cur)) { // not logged in
 | 
				
			||||||
                    if (Event::handle('StartProfileRemoteSubscribe', array($this->out, $this->profile))) {
 | 
					                    if (Event::handle('StartProfileRemoteSubscribe', array($this->out, $this->profile))) {
 | 
				
			||||||
                        $this->out->elementStart('li', 'entity_subscribe');
 | 
					 | 
				
			||||||
                        $this->showRemoteSubscribeLink();
 | 
					 | 
				
			||||||
                        $this->out->elementEnd('li');
 | 
					 | 
				
			||||||
                        Event::handle('EndProfileRemoteSubscribe', array($this->out, $this->profile));
 | 
					                        Event::handle('EndProfileRemoteSubscribe', array($this->out, $this->profile));
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
@@ -298,16 +295,6 @@ class AccountProfileBlock extends ProfileBlock
 | 
				
			|||||||
        $this->out->elementEnd('li');
 | 
					        $this->out->elementEnd('li');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function showRemoteSubscribeLink()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        $url = common_local_url('remotesubscribe',
 | 
					 | 
				
			||||||
                                array('nickname' => $this->profile->nickname));
 | 
					 | 
				
			||||||
        $this->out->element('a', array('href' => $url,
 | 
					 | 
				
			||||||
                                  'class' => 'entity_remote_subscribe'),
 | 
					 | 
				
			||||||
                       // TRANS: Link text for link that will subscribe to a remote profile.
 | 
					 | 
				
			||||||
                       _m('BUTTON','Subscribe'));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    function show()
 | 
					    function show()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->out->elementStart('div', 'profile_block account_profile_block section');
 | 
					        $this->out->elementStart('div', 'profile_block account_profile_block section');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -377,6 +377,20 @@ class OMBPlugin extends Plugin
 | 
				
			|||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    function onStartProfileRemoteSubscribe($out, $profile)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        $out->elementStart('li', 'entity_subscribe');
 | 
				
			||||||
 | 
					        $url = common_local_url('remotesubscribe',
 | 
				
			||||||
 | 
					                                array('nickname' => $this->profile->nickname));
 | 
				
			||||||
 | 
					        $out->element('a', array('href' => $url,
 | 
				
			||||||
 | 
					                                  'class' => 'entity_remote_subscribe'),
 | 
				
			||||||
 | 
					                       // TRANS: Link text for link that will subscribe to a remote profile.
 | 
				
			||||||
 | 
					                       _m('BUTTON','Subscribe'));
 | 
				
			||||||
 | 
					        $out->elementEnd('li');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Plugin version info
 | 
					     * Plugin version info
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user