Skip to content

Commit

Permalink
removed ARC2_Class::queryDB (breaks backward compatibility)
Browse files Browse the repository at this point in the history
It worked only with mysqli, but since 2.4 we use an adapter approach.
therefore tight coupling with mysqli is no longer desired.
  • Loading branch information
k00ni committed Jun 25, 2018
1 parent a909450 commit a3aeb6e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 105 deletions.
38 changes: 0 additions & 38 deletions ARC2_Class.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,44 +503,6 @@ public function getDBObjectFromARC2Class($con = null)
return $this->db_object;
}

/**
* Dont use this function to directly query the database. It currently works only with mysqli DB adapter.
*
* @param string $sql SQL query
* @param mysqli $con Connection
* @param int $log_errors 1 if you want to log errors. Default is 0
*
* @return mysqli Result
*
* @deprecated since 2.4.0
*/
public function queryDB($sql, $con, $log_errors = 0)
{
$t1 = ARC2::mtime();

// create connection using an adapter, if not available yet
$this->getDBObjectFromARC2Class($con);

$r = $this->db_object->mysqliQuery($sql);

// TODO check if this is ever called. it seems not and therefore could be removed.
if (0) {
$t2 = ARC2::mtime() - $t1;
$call_obj = $this;
$call_path = '';
while ($call_obj) {
$call_path = get_class($call_obj) . ' / ' . $call_path;
$call_obj = isset($call_obj->caller) ? $call_obj->caller : false;
}
echo "\n" . $call_path . " needed " . $t2 . ' secs for ' . str_replace("\n" , ' ', $sql);;
}

if ($log_errors && !empty($this->db_object->getErrorMessage())) {
$this->addError($this->db_object->getErrorMessage());
}
return $r;
}

/**
* Shortcut method to create an RDF/XML backup dump from an RDF Store object.
*/
Expand Down
67 changes: 0 additions & 67 deletions tests/db_adapter_depended/ARC2_ClassTest.php

This file was deleted.

0 comments on commit a3aeb6e

Please sign in to comment.