Skip to content

Commit

Permalink
Suppression de la gestion des referer (aucune information utile n'est…
Browse files Browse the repository at this point in the history
… obtenue : > 99% du traffic provient en HTTPS sans referer...)
  • Loading branch information
AnaelMobilia committed Jan 27, 2019
1 parent 22e9e14 commit 6121edc
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 121 deletions.
7 changes: 0 additions & 7 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@
 
Vérifier la cohérence disque / BDD
</a>
<div class="clearfix"></div>
<br />
<a href="<?= _URL_ADMIN_ ?>referer.php" class="btn btn-default">
<span class="glyphicon glyphicon-check"></span>
&nbsp;
Afficher les referer
</a>
</div>
</div>
<?php require _TPL_BOTTOM_ ?>
59 changes: 0 additions & 59 deletions admin/referer.php

This file was deleted.

24 changes: 0 additions & 24 deletions classes/metaObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,30 +239,6 @@ public static function verifierLoginDisponible($login) {
return $retour;
}

/**
* Page de provenance des visiteurs
* @return \ArrayObject
*/
public static function getReferers() {
// Toutes les images
$req = "SELECT urlExt, count(*) AS nb FROM referer
GROUP BY urlExt
ORDER BY 2 DESC
LIMIT 0, 250";

// Exécution de la requête
$resultat = maBDD::getInstance()->query($req);

$retour = new ArrayObject();
// Pour chaque résultat retourné
foreach ($resultat->fetchAll() as $value) {
// J'ajoute le nom de l'image
$retour->offsetSet($value->urlExt, $value->nb);
}

return $retour;
}

/**
* Volume des images
* @return int
Expand Down
14 changes: 0 additions & 14 deletions database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,6 @@ CREATE TABLE IF NOT EXISTS `thumbnails` (
KEY `id_image` (`id_image`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Structure de la table `referer`
--

CREATE TABLE IF NOT EXISTS `referer` (
`id` int(11) NOT NULL,
`urlExt` varchar(255) NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`urlInt` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `urlExt` (`urlExt`),
KEY `urlInt` (`urlInt`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Création du compte administrateur
--
Expand Down
17 changes: 0 additions & 17 deletions displayPics.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,6 @@
}
$monObjet->sauver();

/**
* Suivi des referer
*/
// Statistiques d'usage
if (!defined('_TRAVIS_')) {
$req = maBDD::getInstance()->prepare("INSERT INTO referer (urlExt, urlInt) VALUES (:urlExt, :urlInt)");

if (isset($_SERVER['HTTP_REFERER'])) {
$referer = $_SERVER['HTTP_REFERER'];
} else {
$referer = null;
}
$req->bindValue(':urlExt', $referer, PDO::PARAM_INT);
$req->bindValue(':urlInt', $_SERVER['REQUEST_URI']);
$req->execute();
}

/**
* Fermeture du lien sur la BDD
*/
Expand Down

0 comments on commit 6121edc

Please sign in to comment.