return DI::dba()->processlist();
}
- /**
- * Test if the given table exists
- *
- * @param string $table
- * @return bool
- */
- public static function tableExists(string $table)
- {
- return DI::dba()->tableExists($table);
- }
-
/**
* Fetch a database variable
*
*/
public static function checkInitialValues()
{
- if (DBA::tableExists('contact') && !DBA::exists('contact', ['id' => 0])) {
+ if (self::existsTable('contact') && !DBA::exists('contact', ['id' => 0])) {
DBA::insert('contact', ['nurl' => '']);
$lastid = DBA::lastInsertId();
if ($lastid != 0) {
}
}
- if (DBA::tableExists('permissionset') && !DBA::exists('permissionset', ['id' => 0])) {
+ if (self::existsTable('permissionset') && !DBA::exists('permissionset', ['id' => 0])) {
DBA::insert('permissionset', ['allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '']);
$lastid = DBA::lastInsertId();
if ($lastid != 0) {
}
}
- if (DBA::tableExists('tag') && !DBA::exists('tag', ['id' => 0])) {
+ if (self::existsTable('tag') && !DBA::exists('tag', ['id' => 0])) {
DBA::insert('tag', ['name' => '']);
$lastid = DBA::lastInsertId();
if ($lastid != 0) {
return (["list" => $statelist, "amount" => $processes]);
}
- /**
- * Test if the given table exists
- *
- * @param string $table
- * @return bool
- */
- public function tableExists(string $table)
- {
- return $this->exists(['information_schema' => 'tables'],
- ['table_name' => $table, 'table_schema' => $this->databaseName()]);
- }
-
/**
* Fetch a database variable
*