aboutsummaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/db/mysqli.php
diff options
context:
space:
mode:
authorJason <jasonmm.github@gmail.com>2022-06-21 18:18:32 -0500
committerJason <jasonmm.github@gmail.com>2022-06-21 18:18:37 -0500
commitb43300fbcf92008ac1adc87c4b03776a9a4fb4e8 (patch)
tree21978beea7c1c044bb24bdc11f1cdc12393e2f3a /src/SemanticScuttle/db/mysqli.php
parent856e975127fff8f82b14f2886bb4ffb239541555 (diff)
downloadsemanticscuttle-b43300fbcf92008ac1adc87c4b03776a9a4fb4e8.tar.gz
semanticscuttle-b43300fbcf92008ac1adc87c4b03776a9a4fb4e8.tar.bz2
Use Rector to upgrade constructors.
Modern PHP versions do not recognize methods with the same name as the class as being constructors. This commit upgrades the code so that constructors are named `__construct`. The upgrade was done automatically using Rector.
Diffstat (limited to 'src/SemanticScuttle/db/mysqli.php')
-rw-r--r--src/SemanticScuttle/db/mysqli.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/SemanticScuttle/db/mysqli.php b/src/SemanticScuttle/db/mysqli.php
index 9a2709a..fcff848 100644
--- a/src/SemanticScuttle/db/mysqli.php
+++ b/src/SemanticScuttle/db/mysqli.php
@@ -129,7 +129,7 @@ class sql_db
}
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
-
+
if (!$this->query_result)
{
$this->num_queries++;
@@ -286,7 +286,7 @@ class sql_db
unset($this->rowset[$cur_index]);
unset($this->row[$cur_index]);
-
+
$result = array();
while ($this->rowset[$cur_index] = $this->sql_fetchrow($query_id))
{
@@ -316,7 +316,7 @@ class sql_db
else
{
$cur_index = (is_object($query_id)) ? $query_id->cur_index : $query_id;
-
+
if (empty($this->row[$cur_index]) && empty($this->rowset[$cur_index]))
{
if ($this->row[$cur_index] = $this->sql_fetchrow($query_id))
@@ -382,7 +382,7 @@ class sql_db
function sql_escape($msg) {
return mysqli_real_escape_string($this->db_connect_id, $msg);
}
-
+
function sql_error($sql = '')
{
if (!$this->return_on_error)
@@ -396,7 +396,7 @@ class sql_db
{
$this->sql_transaction('rollback');
}
-
+
trigger_error($message, E_USER_ERROR);
}
@@ -473,7 +473,7 @@ class sql_db
{
$html_table = TRUE;
$html_hold .= '<table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center"><tr>';
-
+
foreach (array_keys($row) as $val)
{
$html_hold .= '<th nowrap="nowrap">' . (($val) ? ucwords(str_replace('_', ' ', $val)) : '&nbsp;') . '</th>';
@@ -559,4 +559,4 @@ class sql_db
} // if ... define
-?> \ No newline at end of file
+?>