Пример #1
0
 /**
  * Creates addons tab ProfileController.
  *
  * @since 2.0.0
  * @package Vanilla
  *
  * @param ProfileController $Sender
  */
 public function profileController_addons_create($Sender)
 {
     $UserReference = val(0, $Sender->RequestArgs, '');
     $Username = val(1, $Sender->RequestArgs, '');
     // Tell the ProfileController what tab to load
     $Sender->getUserInfo($UserReference, $Username);
     $Sender->setTabView('Addons', 'Profile', 'Addon', 'Addons');
     $Offset = 0;
     $Limit = 100;
     $AddonModel = new AddonModel();
     $ResultSet = $AddonModel->getWhere(array('UserID' => $Sender->User->UserID), 'DateUpdated', 'desc', $Limit, $Offset);
     $Sender->setData('Addons', $ResultSet);
     $NumResults = $AddonModel->getCount(array('InsertUserID' => $Sender->User->UserID));
     // Set the HandlerType back to normal on the profilecontroller so that it fetches it's own views
     $Sender->HandlerType = HANDLER_TYPE_NORMAL;
     // Render the ProfileController
     $Sender->render();
 }
Пример #2
0
             $profileController->confirmLinkRequest();
             break;
         case 'deleteLinkRequest':
             $profileController->deleteLinkRequest();
             break;
         default:
             if ($route[2] == 'activities') {
                 $profileController->getNextActivities();
             } else {
                 if ($route[2] == 'ideas') {
                     $profileController->getNextIdeas();
                 } else {
                     if ($route[2] == 'projects') {
                         $profileController->getNextProjects();
                     } else {
                         $profileController->render();
                     }
                 }
             }
             break;
     }
     break;
 case "dashboard":
     $dashboardController = new DashboardController($route[2]);
     $where = $route[2];
     switch ($where) {
         case 'activities':
             $dashboardController->getNextActivities();
             break;
         case 'postActivity':
             $dashboardController->postActivity();