mirror of
https://github.com/friendica/friendica
synced 2025-04-23 22:30:10 +00:00
Rename DBA::is_result to DBA::isResult
This commit is contained in:
parent
0ec44f3e8a
commit
ecea7425f8
152 changed files with 765 additions and 765 deletions
|
@ -29,7 +29,7 @@ class DBStructure
|
|||
$r = q("SELECT `TABLE_NAME` FROM `information_schema`.`tables` WHERE `engine` = 'MyISAM' AND `table_schema` = '%s'",
|
||||
dbesc(DBA::databaseName()));
|
||||
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
echo L10n::t('There are no tables on MyISAM.')."\n";
|
||||
return;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class DBStructure
|
|||
echo $sql."\n";
|
||||
|
||||
$result = DBA::e($sql);
|
||||
if (!DBA::is_result($result)) {
|
||||
if (!DBA::isResult($result)) {
|
||||
self::printUpdateError($sql);
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class DBStructure
|
|||
);
|
||||
|
||||
// No valid result?
|
||||
if (!DBA::is_result($adminlist)) {
|
||||
if (!DBA::isResult($adminlist)) {
|
||||
logger(sprintf('Cannot notify administrators about update_id=%d, error_message=%s', $update_id, $error_message), LOGGER_INFO);
|
||||
|
||||
// Don't continue
|
||||
|
@ -105,7 +105,7 @@ class DBStructure
|
|||
|
||||
$table_status = q("SHOW TABLE STATUS WHERE `name` = '%s'", $table);
|
||||
|
||||
if (DBA::is_result($table_status)) {
|
||||
if (DBA::isResult($table_status)) {
|
||||
$table_status = $table_status[0];
|
||||
} else {
|
||||
$table_status = [];
|
||||
|
@ -114,7 +114,7 @@ class DBStructure
|
|||
$fielddata = [];
|
||||
$indexdata = [];
|
||||
|
||||
if (DBA::is_result($indexes)) {
|
||||
if (DBA::isResult($indexes)) {
|
||||
foreach ($indexes AS $index) {
|
||||
if ($index['Key_name'] != 'PRIMARY' && $index['Non_unique'] == '0' && !isset($indexdata[$index["Key_name"]])) {
|
||||
$indexdata[$index["Key_name"]] = ['UNIQUE'];
|
||||
|
@ -129,7 +129,7 @@ class DBStructure
|
|||
$indexdata[$index["Key_name"]][] = $column;
|
||||
}
|
||||
}
|
||||
if (DBA::is_result($structures)) {
|
||||
if (DBA::isResult($structures)) {
|
||||
foreach ($structures AS $field) {
|
||||
// Replace the default size values so that we don't have to define them
|
||||
$search = ['tinyint(1)', 'tinyint(3) unsigned', 'tinyint(4)', 'smallint(5) unsigned', 'smallint(6)', 'mediumint(8) unsigned', 'mediumint(9)', 'bigint(20)', 'int(10) unsigned', 'int(11)'];
|
||||
|
@ -154,7 +154,7 @@ class DBStructure
|
|||
}
|
||||
}
|
||||
}
|
||||
if (DBA::is_result($full_columns)) {
|
||||
if (DBA::isResult($full_columns)) {
|
||||
foreach ($full_columns AS $column) {
|
||||
$fielddata[$column["Field"]]["Collation"] = $column["Collation"];
|
||||
$fielddata[$column["Field"]]["comment"] = $column["Comment"];
|
||||
|
@ -222,7 +222,7 @@ class DBStructure
|
|||
$tables = q("SHOW TABLES");
|
||||
}
|
||||
|
||||
if (DBA::is_result($tables)) {
|
||||
if (DBA::isResult($tables)) {
|
||||
foreach ($tables AS $table) {
|
||||
$table = current($table);
|
||||
|
||||
|
@ -253,7 +253,7 @@ class DBStructure
|
|||
$temp_name = $name;
|
||||
if (!isset($database[$name])) {
|
||||
$r = self::createTable($name, $structure, $verbose, $action);
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($name);
|
||||
}
|
||||
$is_new_table = true;
|
||||
|
@ -479,13 +479,13 @@ class DBStructure
|
|||
DBA::e("SET session old_alter_table=1;");
|
||||
} else {
|
||||
$r = DBA::e("DROP TABLE IF EXISTS `".$temp_name."`;");
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($sql3);
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$r = DBA::e("CREATE TABLE `".$temp_name."` LIKE `".$name."`;");
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($sql3);
|
||||
return $errors;
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ class DBStructure
|
|||
}
|
||||
|
||||
$r = DBA::e($sql3);
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($sql3);
|
||||
}
|
||||
if ($is_unique && ($temp_name != $name)) {
|
||||
|
@ -501,17 +501,17 @@ class DBStructure
|
|||
DBA::e("SET session old_alter_table=0;");
|
||||
} else {
|
||||
$r = DBA::e("INSERT INTO `".$temp_name."` SELECT ".$field_list." FROM `".$name."`".$group_by.";");
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($sql3);
|
||||
return $errors;
|
||||
}
|
||||
$r = DBA::e("DROP TABLE `".$name."`;");
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($sql3);
|
||||
return $errors;
|
||||
}
|
||||
$r = DBA::e("RENAME TABLE `".$temp_name."` TO `".$name."`;");
|
||||
if (!DBA::is_result($r)) {
|
||||
if (!DBA::isResult($r)) {
|
||||
$errors .= self::printUpdateError($sql3);
|
||||
return $errors;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue