Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7330 Rev 7335
Línea 185... Línea 185...
185
        if($headers->has('created')) {
185
        if($headers->has('created')) {
186
            $timestamp =  Functions::sanitizeFilterString($headers->get('created')->getFieldValue());
186
            $timestamp =  Functions::sanitizeFilterString($headers->get('created')->getFieldValue());
187
        } else {
187
        } else {
188
            $timestamp = 0;
188
            $timestamp = 0;
189
        }
189
        }
190
 
-
 
191
        
-
 
Línea -... Línea 190...
-
 
190
        
Línea 192... Línea 191...
192
        
191
 
193
        
192
        
194
        $this->currentNetworkPlugin = new CurrentNetworkPlugin($adapter);
193
        $this->currentNetworkPlugin = new CurrentNetworkPlugin($adapter);
195
        if(!$this->currentNetworkPlugin->hasNetwork()) {
194
        if(!$this->currentNetworkPlugin->hasNetwork()) {
Línea 283... Línea 282...
283
                $this->sendResponse($response, ['success' => false, 'data' => '401 Unauthorized - The user is not part of this private network', 'fatal' => true]);
282
                $this->sendResponse($response, ['success' => false, 'data' => '401 Unauthorized - The user is not part of this private network', 'fatal' => true]);
Línea 284... Línea 283...
284
                
283
                
285
            }
284
            }
Línea -... Línea 285...
-
 
285
        }
-
 
286
        
-
 
287
        /*
-
 
288
        $application = $event->getApplication();
-
 
289
        $templateMapResolver = $application->getServiceManager()->get(
-
 
290
            'ViewTemplateMapResolver'
-
 
291
            );
-
 
292
        
-
 
293
        
-
 
294
        $listener = new LayoutListener($templateMapResolver);
Línea 286... Línea 295...
286
        }
295
        $listener->attach($application->getEventManager());*/
287
        
296
        
288
        
297
        
Línea 696... Línea 705...
696
                    $userMapper = UserMapper::getInstance($adapter);
705
                    $userMapper = UserMapper::getInstance($adapter);
697
                    $userMapper->updateLastActivity($user->id);
706
                    $userMapper->updateLastActivity($user->id);
698
                }
707
                }
699
            }
708
            }
Línea 700... Línea -...
700
            
-
 
701
            if($this->isHtml) {
-
 
702
                /*
-
 
703
                $exclude = [
-
 
704
                    'signin',
-
 
705
                    'oauth/facebook',
-
 
706
                    'oauth/facebook/cancel',
-
 
707
                    'oauth/facebook/delete',
-
 
708
                    'oauth/twitter',
-
 
709
                    'oauth/google',
-
 
710
                    'oauth/instagram',
-
 
711
                    'paypal',
-
 
712
                    'paypal/success',
-
 
713
                    'paypal/cancel',
-
 
714
                    'storage',
-
 
715
                    'storage-network',
-
 
716
                    'signout'
709
            
717
                    
-
 
718
                ];
-
 
719
                
-
 
720
                if(!in_array($routeName, $exclude)) {
-
 
721
                
-
 
722
                    $url = $event->getRouter()->assemble([], ['name' => 'signin']);
-
 
723
                    
-
 
724
                    $response = $event->getResponse();
-
 
725
                    $headers = $response->getHeaders();
-
 
726
                    $headers->clearHeaders();
-
 
727
                    $headers->addHeaderLine('Location', $url);
-
 
728
                    
-
 
729
                    $response->setStatusCode(302);
-
 
730
                    $response->send();
-
 
731
                }*/
-
 
Línea 732... Línea 710...
732
            }
710
 
Línea 733... Línea 711...
733
            
711
            
734
        } else {
712
        } else {
Línea 781... Línea 759...
781
    }
759
    }
Línea 782... Línea 760...
782
   
760
   
783
 
761
 
-
 
762
    public function authPosDispatch(MvcEvent $event)
-
 
763
    {
-
 
764
        if($this->isHtml) {
-
 
765
            if(empty($_SERVER['REDIRECT_URL'])) {
-
 
766
                if(empty($_SERVER['REQUEST_URI'])) {
-
 
767
                    $routeName = '';
-
 
768
                    
-
 
769
                } else {
-
 
770
                    $routeName = $_SERVER['REQUEST_URI'];
-
 
771
                }
-
 
772
                
-
 
773
            } else {
-
 
774
                $routeName = $_SERVER['REDIRECT_URL'];
-
 
775
                
-
 
776
            }
-
 
777
            
-
 
778
            
-
 
779
            $routeName = strtolower(trim($routeName));
-
 
780
            if(strlen($routeName) > 0 && substr($routeName, 0, 1) == '/') {
-
 
781
                $routeName = substr($routeName, 1);
-
 
782
            }
-
 
783
            
-
 
784
            
-
 
785
            $exclude = [
-
 
786
                'oauth/facebook',
-
 
787
                'oauth/facebook/cancel',
-
 
788
                'oauth/facebook/delete',
-
 
789
                'oauth/twitter',
-
 
790
                'oauth/google',
-
 
791
                'oauth/instagram',
-
 
792
                'paypal',
-
 
793
                'paypal/success',
-
 
794
                'paypal/cancel',
-
 
795
                'storage',
-
 
796
                'storage-network',
-
 
797
                'signout'
-
 
798
                
-
 
799
            ];
-
 
800
            
-
 
801
            if(!in_array($routeName, $exclude)) {
784
    public function authPosDispatch(MvcEvent $event)
802
                $event->getViewModel()->setTemplate('layout/layout-spa');
-
 
803
            }
785
    {
804
            
Línea 786... Línea -...
786
        
-
 
787
    }
-
 
788
    
805
        }
789
    /*
-
 
790
     * Array
-
 
791
(
-
 
792
    [0] => __construct
-
 
793
    [1] => __set
-
 
794
    [2] => __get
-
 
795
    [3] => __isset
-
 
796
    [4] => __unset
-
 
797
    [5] => __clone
-
 
798
    [6] => setOption
-
 
799
    [7] => getOption
-
 
800
    [8] => setOptions
-
 
801
    [9] => getOptions
-
 
802
    [10] => clearOptions
-
 
803
    [11] => getVariable
-
 
804
    [12] => setVariable
-
 
805
    [13] => setVariables
-
 
806
    [14] => getVariables
-
 
807
    [15] => clearVariables
-
 
808
    [16] => setTemplate
-
 
809
    [17] => getTemplate
-
 
810
    [18] => addChild
-
 
811
    [19] => getChildren
-
 
812
    [20] => hasChildren
-
 
813
    [21] => clearChildren
-
 
814
    [22] => getChildrenByCaptureTo
-
 
815
    [23] => setCaptureTo
-
 
816
    [24] => captureTo
-
 
817
    [25] => setTerminal
-
 
818
    [26] => terminate
-
 
819
    [27] => setAppend
-
 
820
    [28] => isAppend
-
 
821
    [29] => count
-
 
Línea 822... Línea 806...
822
    [30] => getIterator
806
    }