| Línea 18... |
Línea 18... |
| 18 |
use LeadersLinked\Mapper\UserProfileMapper;
|
18 |
use LeadersLinked\Mapper\UserProfileMapper;
|
| 19 |
use LeadersLinked\Mapper\ProfileVisitMapper;
|
19 |
use LeadersLinked\Mapper\ProfileVisitMapper;
|
| 20 |
use LeadersLinked\Mapper\ConnectionMapper;
|
20 |
use LeadersLinked\Mapper\ConnectionMapper;
|
| 21 |
use LeadersLinked\Form\Feed\CreateForm;
|
21 |
use LeadersLinked\Form\Feed\CreateForm;
|
| 22 |
use LeadersLinked\Form\Feed\ShareForm;
|
22 |
use LeadersLinked\Form\Feed\ShareForm;
|
| - |
|
23 |
use LeadersLinked\Model\Network;
|
| Línea 23... |
Línea 24... |
| 23 |
|
24 |
|
| 24 |
class DashboardController extends AbstractActionController
|
25 |
class DashboardController extends AbstractActionController
|
| 25 |
{
|
26 |
{
|
| 26 |
/**
|
27 |
/**
|
| Línea 65... |
Línea 66... |
| 65 |
public function indexAction()
|
66 |
public function indexAction()
|
| 66 |
{
|
67 |
{
|
| 67 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
68 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
| 68 |
$currentUser = $currentUserPlugin->getUser();
|
69 |
$currentUser = $currentUserPlugin->getUser();
|
| Línea -... |
Línea 70... |
| - |
|
70 |
|
| - |
|
71 |
$currentNetworkPlugin = $this->plugin('currentNetworkPlugin');
|
| - |
|
72 |
$currentNetwork = $currentNetworkPlugin->getNetwork();
|
| 69 |
|
73 |
|
| 70 |
$userMapper = UserMapper::getInstance($this->adapter);
|
74 |
$userMapper = UserMapper::getInstance($this->adapter);
|
| Línea 71... |
Línea 75... |
| 71 |
$user = $userMapper->fetchOne($currentUser->id);
|
75 |
$user = $userMapper->fetchOne($currentUser->id);
|
| 72 |
|
76 |
|
| Línea 96... |
Línea 100... |
| 96 |
$profileVisitMapper = ProfileVisitMapper::getInstance($this->adapter);
|
100 |
$profileVisitMapper = ProfileVisitMapper::getInstance($this->adapter);
|
| 97 |
//$visits = $profileVisitMapper->getTotalByVisitedId($currentUser->id);
|
101 |
//$visits = $profileVisitMapper->getTotalByVisitedId($currentUser->id);
|
| Línea 98... |
Línea 102... |
| 98 |
|
102 |
|
| Línea -... |
Línea 103... |
| - |
|
103 |
$visits = $profileVisitMapper->getTotalByVisitedIdGroupVisitorId($currentUser->id);
|
| 99 |
$visits = $profileVisitMapper->getTotalByVisitedIdGroupVisitorId($currentUser->id);
|
104 |
|
| 100 |
|
105 |
if($currentNetwork->relationship_user_mode == Network::RELATIONSHIP_USER_MODE_USER_2_USER) {
|
| 101 |
$connectionMapper = ConnectionMapper::getInstance($this->adapter);
|
- |
|
| - |
|
106 |
$connectionMapper = ConnectionMapper::getInstance($this->adapter);
|
| - |
|
107 |
$connections = $connectionMapper->fetchTotalConnectionByUser($currentUser->id);
|
| - |
|
108 |
} else {
|
| - |
|
109 |
if($currentNetwork->default == Network::DEFAULT_YES) {
|
| - |
|
110 |
$connections = $userMapper->fetchCountActiveByDefaultNetworkId($currentNetwork->id);
|
| - |
|
111 |
} else {
|
| - |
|
112 |
$connections = $userMapper->fetchCountActiveByOtherNetworkId($currentNetwork->id);
|
| Línea 102... |
Línea 113... |
| 102 |
$connections = $connectionMapper->fetchTotalConnectionByUser($currentUser->id);
|
113 |
}
|
| 103 |
|
114 |
}
|
| 104 |
|
115 |
|
| Línea 138... |
Línea 149... |
| 138 |
|
149 |
|
| 139 |
$profileVisitMapper = ProfileVisitMapper::getInstance($this->adapter);
|
150 |
$profileVisitMapper = ProfileVisitMapper::getInstance($this->adapter);
|
| 140 |
// $visits = $profileVisitMapper->getTotalByVisitedId($currentUser->id);
|
151 |
// $visits = $profileVisitMapper->getTotalByVisitedId($currentUser->id);
|
| Línea -... |
Línea 152... |
| - |
|
152 |
$visits = $profileVisitMapper->getTotalByVisitedIdGroupVisitorId($currentUser->id);
|
| - |
|
153 |
|
| 141 |
$visits = $profileVisitMapper->getTotalByVisitedIdGroupVisitorId($currentUser->id);
|
154 |
|
| 142 |
|
155 |
if($currentNetwork->relationship_user_mode == Network::RELATIONSHIP_USER_MODE_USER_2_USER) {
|
| - |
|
156 |
$connectionMapper = ConnectionMapper::getInstance($this->adapter);
|
| - |
|
157 |
$connections = $connectionMapper->fetchTotalConnectionByUser($currentUser->id);
|
| - |
|
158 |
} else {
|
| - |
|
159 |
if($currentNetwork->default == Network::DEFAULT_YES) {
|
| - |
|
160 |
$connections = $userMapper->fetchCountActiveByDefaultNetworkId($currentNetwork->id);
|
| - |
|
161 |
} else {
|
| - |
|
162 |
$connections = $userMapper->fetchCountActiveByOtherNetworkId($currentNetwork->id);
|
| - |
|
163 |
}
|
| - |
|
164 |
|
| - |
|
165 |
$connections--;
|
| Línea 143... |
Línea 166... |
| 143 |
$connectionMapper = ConnectionMapper::getInstance($this->adapter);
|
166 |
}
|
| 144 |
$connections = $connectionMapper->fetchTotalConnectionByUser($currentUser->id);
|
167 |
|
| 145 |
|
168 |
|