Пример #1
0
 public function prepareParams()
 {
     if (!empty($this->_params['_thread']['thread_id'])) {
         call_user_func_array(array('bdApi_ViewApi_Helper_Subscription', 'prepareDiscoveryParams'), array(&$this->_params, $this->_response, bdApi_Model_Subscription::TYPE_THREAD_POST, $this->_params['_thread']['thread_id'], XenForo_Link::buildApiLink('posts', null, array('thread_id' => $this->_params['_thread']['thread_id'], 'oauth_token' => '')), isset($this->_params['_thread']['bdapi_thread_post']) ? $this->_params['_thread']['bdapi_thread_post'] : ''));
     }
     parent::prepareParams();
 }
Пример #2
0
 public function prepareParams()
 {
     if (!empty($this->_params['_user']['user_id'])) {
         call_user_func_array(array('bdApi_ViewApi_Helper_Subscription', 'prepareDiscoveryParams'), array(&$this->_params, $this->_response, bdApi_Model_Subscription::TYPE_USER, $this->_params['_user']['user_id'], XenForo_Link::buildApiLink('users', $this->_params['_user'], array('oauth_token' => '')), isset($this->_params['_user']['bdapi_user']) ? $this->_params['_user']['bdapi_user'] : ''));
     }
     parent::prepareParams();
 }
Пример #3
0
 public function prepareParams()
 {
     if (!empty($this->_params['_thread']['thread_id'])) {
         bdApi_ViewApi_Helper_Subscription::prepareDiscoveryParams($this->_params, $this->_response, bdApi_Model_Subscription::TYPE_THREAD_POST, $this->_params['_thread']['thread_id'], bdApi_Data_Helper_Core::safeBuildApiLink('posts', null, array('thread_id' => $this->_params['_thread']['thread_id'], 'oauth_token' => '')), isset($this->_params['_thread']['bdapi_thread_post']) ? $this->_params['_thread']['bdapi_thread_post'] : '');
     }
     parent::prepareParams();
 }
Пример #4
0
 public function prepareParams()
 {
     if (!empty($this->_params['_user']['user_id'])) {
         bdApi_ViewApi_Helper_Subscription::prepareDiscoveryParams($this->_params, $this->_response, bdApi_Model_Subscription::TYPE_USER, $this->_params['_user']['user_id'], bdApi_Data_Helper_Core::safeBuildApiLink('users', $this->_params['_user'], array('oauth_token' => '')), isset($this->_params['_user']['bdapi_user']) ? $this->_params['_user']['bdapi_user'] : '');
     }
     parent::prepareParams();
 }
Пример #5
0
 public function prepareParams()
 {
     if (empty($this->_params['_pageTemplate']) && !empty($this->_params['page']) && !empty($this->_params['_pageTemplateTitle'])) {
         $this->_params['page']['page_html'] = $this->createTemplateObject($this->_params['_pageTemplateTitle'], $this->_params);
         $this->_params['_pageTemplate'] = true;
     }
     parent::prepareParams();
 }
Пример #6
0
 public function prepareParams()
 {
     // render notification html
     $notifications =& $this->_params['notifications'];
     $templates = bdApi_ViewApi_Helper_Alert::getTemplates($this, $this->_params['_alerts'], $this->_params['_alertHandlers']);
     foreach ($notifications as $key => &$notification) {
         $notification['notification_html'] = $templates[$notification['notification_id']]['template'];
     }
     call_user_func_array(array('bdApi_ViewApi_Helper_Subscription', 'prepareDiscoveryParams'), array(&$this->_params, $this->_response, bdApi_Model_Subscription::TYPE_NOTIFICATION, XenForo_Visitor::getUserId(), XenForo_Link::buildApiLink('notifications', null, array('oauth_token' => '')), XenForo_Visitor::getInstance()->get('bdapi_user_notification')));
     parent::prepareParams();
 }
Пример #7
0
 public function prepareParams()
 {
     parent::prepareParams();
     if (!empty($this->_params['_statusCode'])) {
         $this->_response->setHttpResponseCode($this->_params['_statusCode']);
     }
     if (!empty($this->_params['_headers'])) {
         foreach ($this->_params['_headers'] as $headerName => $headerValue) {
             $this->_response->setHeader($headerName, $headerValue);
         }
     }
 }