Ljonka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/304993

Change subject: Statistics: replace mysql with mysqli command
......................................................................

Statistics: replace mysql with mysqli command

Change-Id: I515d80c2bf56f949422561daa8912c16a674cb9f
---
M Statistics/includes/MySQLDbReader.class.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/93/304993/1

diff --git a/Statistics/includes/MySQLDbReader.class.php 
b/Statistics/includes/MySQLDbReader.class.php
index 3cac052..8d0b828 100644
--- a/Statistics/includes/MySQLDbReader.class.php
+++ b/Statistics/includes/MySQLDbReader.class.php
@@ -61,11 +61,11 @@
                $sql = str_replace("@start", " 
'".$interval->getStartTS("YmdHis")."' ", $sql);
                $sql = str_replace("@end", " 
'".$interval->getEndTS("YmdHis")."' ", $sql);
 
-               $res = mysql_query($sql);
+               $res = mysqli_query($sql);
                if (!$res){
                        return 0;
                }
-               $row = mysql_fetch_array($res);
+               $row = mysqli_fetch_array($res);
 
                $item = $row[0];
                //if ($listable)
@@ -92,12 +92,12 @@
                $sql = str_replace("@start", " 
'".$interval->getStartTS("YmdHis")."' ", $sql);
                $sql = str_replace("@end", " 
'".$interval->getEndTS("YmdHis")."' ", $sql);
 //echo '<br>'.$sql;
-               $res = mysql_query($sql);
+               $res = mysqli_query($sql);
                if (!$res){
                        return $uniqueValues;
                }
 
-               while ($row = mysql_fetch_array($res)) {
+               while ($row = mysqli_fetch_array($res)) {
                        $rowArr = array();
                        for ($i=0; $i<$count; $i++ )
                                $rowArr[] = $row[$i];
@@ -117,8 +117,8 @@
        private function connect()
        {
                if ($this->conn) return $this->conn;
-               $this->conn = mysql_connect($this->host, $this->user, 
$this->pass);
-               mysql_select_db($this->db);
+               $this->conn = mysqli_connect($this->host, $this->user, 
$this->pass);
+               mysqli_select_db($this->db);
                return $this->conn;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/304993
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I515d80c2bf56f949422561daa8912c16a674cb9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Ljonka <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to