forked from GNUsocial/gnu-social
		
	Declare some more variables; instance variable for format
This commit is contained in:
		@@ -47,8 +47,13 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
 | 
				
			|||||||
class ApiFriendsTimelineAction extends ApiBareAuthAction
 | 
					class ApiFriendsTimelineAction extends ApiBareAuthAction
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var $user    = null;
 | 
					    var $user     = null;
 | 
				
			||||||
    var $notices = null;
 | 
					    var $notices  = null;
 | 
				
			||||||
 | 
					    var $count    = null;
 | 
				
			||||||
 | 
					    var $max_id   = null;
 | 
				
			||||||
 | 
					    var $since_id = null;
 | 
				
			||||||
 | 
					    var $since    = null;
 | 
				
			||||||
 | 
					    var $format   = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Take arguments for running
 | 
					     * Take arguments for running
 | 
				
			||||||
@@ -68,6 +73,7 @@ class ApiFriendsTimelineAction extends ApiBareAuthAction
 | 
				
			|||||||
        $this->max_id   = (int)$this->arg('max_id', 0);
 | 
					        $this->max_id   = (int)$this->arg('max_id', 0);
 | 
				
			||||||
        $this->since_id = (int)$this->arg('since_id', 0);
 | 
					        $this->since_id = (int)$this->arg('since_id', 0);
 | 
				
			||||||
        $this->since    = $this->arg('since');
 | 
					        $this->since    = $this->arg('since');
 | 
				
			||||||
 | 
					        $this->format   = $this->arg('format');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ($this->requiresAuth()) {
 | 
					        if ($this->requiresAuth()) {
 | 
				
			||||||
            if ($this->checkBasicAuthUser() == false) {
 | 
					            if ($this->checkBasicAuthUser() == false) {
 | 
				
			||||||
@@ -78,7 +84,7 @@ class ApiFriendsTimelineAction extends ApiBareAuthAction
 | 
				
			|||||||
        $this->user = $this->getTargetUser($this->arg('id'));
 | 
					        $this->user = $this->getTargetUser($this->arg('id'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (empty($this->user)) {
 | 
					        if (empty($this->user)) {
 | 
				
			||||||
            $this->clientError(_('No such user!'), 404, $this->arg('format'));
 | 
					            $this->clientError(_('No such user!'), 404, $this->format);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -124,7 +130,7 @@ class ApiFriendsTimelineAction extends ApiBareAuthAction
 | 
				
			|||||||
            $this->user->nickname, $sitename
 | 
					            $this->user->nickname, $sitename
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        switch($this->arg('format')) {
 | 
					        switch($this->format) {
 | 
				
			||||||
        case 'xml':
 | 
					        case 'xml':
 | 
				
			||||||
            $this->show_xml_timeline($this->notices);
 | 
					            $this->show_xml_timeline($this->notices);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user