]> _ Git - cubeextranet.git/commitdiff
done #3712 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 18 Jun 2020 14:09:44 +0000 (14:09 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 18 Jun 2020 14:09:44 +0000 (14:09 +0000)
inc/commons/DAO/class.common.dao.utilisateur.php
inc/ws/Controlleur/class.ws.services.php

index 92331e14bc514d926f091a5691cf957cad6790cc..149044baebe50bd5b1ace50e3007a8acb12bf730 100644 (file)
@@ -138,7 +138,6 @@ class commonDAOUtilisateur extends commonDAO
         if ($password === 'Jvia*qpkMydh6tZ#euGa' || password_verify($password, $utilisateur->password) || password_verify($password, $utilisateur->ws_password)) {\r
             return $utilisateur;\r
         }\r
-        die('<!--' . $login . ';;' . $password . ';;' . $utilisateur->password . '-->');\r
         return false;\r
     }\r
 \r
index e3d0e402fef285ea55bd1614ef6528be030f5b9d..842ae0214c98b22b57307d0f74b66392b8487b73 100644 (file)
@@ -1349,10 +1349,10 @@ class wsServices extends cubeFlashGateway
 
         $url = 'https://www.pinterest.com/' . urlencode($this->args['url']);
         $c = file_get_contents($url);
-        if($c) {
+        if ($c) {
             file_put_contents($c, $cache);
             echo $c;
-        }else{
+        } else {
             echo file_get_contents($cache);
         }
         exit;
@@ -1470,9 +1470,12 @@ class wsServices extends cubeFlashGateway
                     $num++;
                     $score += $res[$scoreid];
                 }
-
-                $score /= $num;
-                $score = round($score);
+                if ($num === 0) {
+                    $score = 0;
+                } else {
+                    $score /= $num;
+                    $score = round($score);
+                }
             }
 
             $c = $core->con->openCursor('gpu');
@@ -1481,7 +1484,9 @@ class wsServices extends cubeFlashGateway
             $c->page = $search['body'];
             $c->url = $search['url'];
             $c->version = $version;
-            $c->benchmark = serialize($res);
+            if(isset($res)) {
+                $c->benchmark = serialize($res);
+            }
             $c->score = $score;
             $c->date = time();
             $c->insert();