From f70a32303a20739b3897d040eb6b20983dec31fe Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 25 Nov 2013 19:58:03 +0000 Subject: [PATCH] Streetview : Try to reduce the number of hits --- application/controllers/IdentiteController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/application/controllers/IdentiteController.php b/application/controllers/IdentiteController.php index 90b74af4a..5da9faa3d 100644 --- a/application/controllers/IdentiteController.php +++ b/application/controllers/IdentiteController.php @@ -1163,11 +1163,14 @@ class IdentiteController extends Zend_Controller_Action } $lat = $request->getParam('lat', ''); + $this->view->assign('lat', $lat); $lon = $request->getParam('lon', ''); + $this->view->assign('lon', $lon); + $num = $request->getParam('heading', 0); - $streetview = new Scores_Google_Streetview($siret); - if ( $lat != '' && $lon != '' ) { + if ( intval($siret)>100 && $lat != '' && $lon != '' ) { + $streetview = new Scores_Google_Streetview($siret); $deg = $streetview->getNumDeg(); $nbImg = count($deg); $pagePrec = $num-1; @@ -1190,8 +1193,7 @@ class IdentiteController extends Zend_Controller_Action $this->view->assign('url', $url); } } - $this->view->assign('lat', $lat); - $this->view->assign('lon', $lon); + } public function groupesarboimgAction()