mirror of
https://github.com/friendica/friendica
synced 2024-12-27 04:06:18 +01:00
Rename DBA::clean_query to DBA::cleanQuery
This commit is contained in:
parent
910e832dc2
commit
abbaaf5aa5
3 changed files with 5 additions and 5 deletions
|
@ -28,7 +28,7 @@ function q($sql) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = DBA::clean_query($sql);
|
$sql = DBA::cleanQuery($sql);
|
||||||
$sql = DBA::anyValueFallback($sql);
|
$sql = DBA::anyValueFallback($sql);
|
||||||
|
|
||||||
$stmt = @vsprintf($sql, $args);
|
$stmt = @vsprintf($sql, $args);
|
||||||
|
|
|
@ -306,7 +306,7 @@ class DBA
|
||||||
* @param string $sql An SQL string without the values
|
* @param string $sql An SQL string without the values
|
||||||
* @return string The input SQL string modified if necessary.
|
* @return string The input SQL string modified if necessary.
|
||||||
*/
|
*/
|
||||||
public static function clean_query($sql) {
|
public static function cleanQuery($sql) {
|
||||||
$search = ["\t", "\n", "\r", " "];
|
$search = ["\t", "\n", "\r", " "];
|
||||||
$replace = [' ', ' ', ' ', ' '];
|
$replace = [' ', ' ', ' ', ' '];
|
||||||
do {
|
do {
|
||||||
|
@ -396,7 +396,7 @@ class DBA
|
||||||
logger('Parameter mismatch. Query "'.$sql.'" - Parameters '.print_r($args, true), LOGGER_DEBUG);
|
logger('Parameter mismatch. Query "'.$sql.'" - Parameters '.print_r($args, true), LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = self::clean_query($sql);
|
$sql = self::cleanQuery($sql);
|
||||||
$sql = self::anyValueFallback($sql);
|
$sql = self::anyValueFallback($sql);
|
||||||
|
|
||||||
$orig_sql = $sql;
|
$orig_sql = $sql;
|
||||||
|
|
|
@ -322,8 +322,8 @@ class DBStructure
|
||||||
$parameters['comment'] = "";
|
$parameters['comment'] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$current_field_definition = DBA::clean_query(implode(",", $field_definition));
|
$current_field_definition = DBA::cleanQuery(implode(",", $field_definition));
|
||||||
$new_field_definition = DBA::clean_query(implode(",", $parameters));
|
$new_field_definition = DBA::cleanQuery(implode(",", $parameters));
|
||||||
if ($current_field_definition != $new_field_definition) {
|
if ($current_field_definition != $new_field_definition) {
|
||||||
$sql2 = self::modifyTableField($fieldname, $parameters);
|
$sql2 = self::modifyTableField($fieldname, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
|
|
Loading…
Reference in a new issue