Skip to content
This repository was archived by the owner on Apr 9, 2023. It is now read-only.

Commit 6430e5e

Browse files
committed
Minor improvements
1 parent 2993c08 commit 6430e5e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

webanalytics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function save_request() {
518518
// Construct: web_analytics({db_manager}, $_SERVER, $_COOKIE)
519519
// If you don't want to anonymize ip adresses: web_analytics({db_manager}, $_SERVER, $_COOKIE, FALSE)
520520
// Please remember to write a privacy policy especially if you don't anonymize ip adresses and live in the EU.
521-
function __construct($db_manager, $server, $cookies, $anonymizeips = TRUE) {
521+
function __construct(web_db_manager $db_manager, $server, $cookies, $anonymizeips = TRUE) {
522522
if($db_manager->connected) {
523523
$this->db_manager = $db_manager;
524524
$this->s = $server;

webstatistics.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,6 @@ function count($table, $filter = null) {
721721
$result = $this->get_one_row("SELECT COUNT(*) FROM `".$table."`".$this->get_filter($filter).";");
722722
return $result[0];
723723
}
724-
725-
function get_rows_array($query) {
726-
return $this->query($query);
727-
}
728724

729725
function get_one_row($query) {
730726
foreach ($this->query($query) as $row) {
@@ -801,7 +797,7 @@ function connect() {
801797
$this->connection = new PDO($this->dsn, $this->user, $this->password);
802798
$this->connected = TRUE;
803799
} catch (PDOException $e) {
804-
echo "Connection failed: " . $e->getMessage();
800+
error_log("Connection failed: " . $e->getMessage());
805801
$this->connected = FALSE;
806802
}
807803
}

0 commit comments

Comments
 (0)