Ejemplo n.º 1
0
 /**
  * onBeforeBrowse
  *
  * @return  void
  */
 public function onBeforeBrowse()
 {
     $result = parent::onBeforeBrowse();
     if ($result) {
         // Run the automatic update site refresh
         $updateModel = F0FModel::getTmpInstance('LiveUpdates', 'AutoTweetModel');
         $updateModel->refreshUpdateSite();
     }
     return $result;
 }
Ejemplo n.º 2
0
 /**
  * Method to get a reference to the current view and load it if necessary.
  *
  * @param   string  $name    The view name. Optional, defaults to the controller name.
  * @param   string  $type    The view type. Optional.
  * @param   string  $prefix  The class prefix. Optional.
  * @param   array   $config  Configuration array for view. Optional.
  *
  * @throws Exception
  *
  * @return  F0FView  Reference to the view or an error.
  */
 public function getView($name = '', $type = '', $prefix = '', $config = array())
 {
     if (array_key_exists('layout', $config) && strpos($config['layout'], 'channel-post') > 0) {
         $type = 'raw';
     }
     return parent::getView($name, $type, $prefix, $config);
 }
Ejemplo n.º 3
0
 /**
  * readAjaxAction
  *
  * @return	void
  */
 public function readAjaxAction()
 {
     try {
         $this->task = 'read';
         parent::read();
     } catch (Exception $e) {
         $message = json_encode(array('status' => false, 'message' => $e->getMessage(), 'messageType' => 'error', 'hash' => AutotweetBaseHelper::getHash()));
         echo EJSON_START . $message . EJSON_END;
     }
 }