Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5516 | Rev 5518 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5516 Rev 5517
Línea 1026... Línea 1026...
1026
 
1026
 
1027
    public function timelineAction()
1027
    public function timelineAction()
1028
    {
1028
    {
1029
        $utilMapper = UtilMapper::getInstance($this->adapter);
1029
        $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
1030
        $now = $utilMapper->getDatebaseNow();
-
 
1031
 
-
 
1032
        $currentUserPlugin = $this->plugin('currentUserPlugin');
-
 
1033
        $currentUser = $currentUserPlugin->getUser();
-
 
1034
 
-
 
1035
        $type = $this->params()->fromRoute('type');
-
 
1036
 
-
 
1037
        if ($type == 'user') {
-
 
1038
            $id = $currentUser->id;
-
 
1039
        } else {
-
 
1040
            $id = $this->params()->fromRoute('id');
-
 
1041
        }
-
 
1042
 
-
 
1043
        if ($type == 'user') {
-
 
1044
            $connectionMapper = ConnectionMapper::getInstance($this->adapter);
-
 
1045
            $records = $connectionMapper->fetchAllConnectionsByUser($id);
-
 
1046
            $connectionIds = [0];
-
 
1047
            foreach ($records as $record) {
-
 
1048
                if ($currentUser->id == $record->request_from) {
-
 
1049
                    array_push($connectionIds, $record->request_to);
-
 
1050
                } else {
1030
        $now = $utilMapper->getDatebaseNow();
1051
                    array_push($connectionIds, $record->request_from);
-
 
1052
                }
1031
        return $now;
1053
            }
Línea 1032... Línea 1054...
1032
    }
1054
    }
1033
 
1055
 
1034
    /**
1056
    /**