/** * Default landing page action for the web application. * * Displays a feed of new records that have been created since the last * login of the current web user. */ public function actionView($id, $publicProfile = false) { if (isset($_GET['ajax'])) { // ajax request from grid view widget if (!isset($_POST['widgetClass']) && !isset($_POST['widgetType'])) { $_POST['widgetClass'] = $_GET['ajax']; $_POST['widgetType'] = $_GET['widgetType']; } if (SortableWidget::getParentType($_POST['widgetType']) === 'recordView') { $_POST['modelId'] = $_GET['modelId']; $_POST['modelType'] = $_GET['modelType']; } $this->actionShowWidgetContents(); return; } if (isset($_GET['widgetClass']) && isset($_GET['widgetType']) && SortableWidget::getParentType($_GET['widgetType']) === 'recordView' && isset($_GET['modelId']) && isset($_GET['modelType'])) { $_POST['widgetClass'] = $_GET['widgetClass']; $_POST['widgetType'] = $_GET['widgetType']; $_POST['modelId'] = $_GET['modelId']; $_POST['modelType'] = $_GET['modelType']; $this->actionShowWidgetContents(); return; } if (isset($_GET['widgetClass']) && isset($_GET['widgetType'])) { $_POST['widgetClass'] = $_GET['widgetClass']; $_POST['widgetType'] = $_GET['widgetType']; $this->actionShowWidgetContents(); return; } if (!Yii::app()->user->isGuest) { $activityFeedParams = $this->getActivityFeedViewParams($id, $publicProfile); $params = array('activityFeedParams' => $activityFeedParams, 'isMyProfile' => $activityFeedParams['isMyProfile'], 'model' => $activityFeedParams['model']); $this->render('profile', $params); } else { $this->redirectToLogin(); } }