mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-12 10:31:09 +03:00
Rename "available_update" table to "availableupdate"
This is needed to follow naming convention
This commit is contained in:
parent
4b74ceb854
commit
6bf331b355
@ -318,7 +318,7 @@ plugin:
|
|||||||
name: [name]
|
name: [name]
|
||||||
|
|
||||||
# Contains info about all available updates
|
# Contains info about all available updates
|
||||||
available_update:
|
availableupdate:
|
||||||
fields:
|
fields:
|
||||||
# Artificial ID
|
# Artificial ID
|
||||||
id: "INT NOT NULL auto_increment PRIMARY KEY"
|
id: "INT NOT NULL auto_increment PRIMARY KEY"
|
||||||
|
@ -79,7 +79,7 @@ class AvailableUpdate
|
|||||||
|
|
||||||
// Load update's info
|
// Load update's info
|
||||||
$info = Database::getInstance()->query(
|
$info = Database::getInstance()->query(
|
||||||
"SELECT * FROM {available_update} WHERE id = :id",
|
"SELECT * FROM {availableupdate} WHERE id = :id",
|
||||||
array(':id' => $id),
|
array(':id' => $id),
|
||||||
array('return_rows' => Database::RETURN_ONE_ROW)
|
array('return_rows' => Database::RETURN_ONE_ROW)
|
||||||
);
|
);
|
||||||
@ -112,7 +112,7 @@ class AvailableUpdate
|
|||||||
|
|
||||||
// Load update info
|
// Load update info
|
||||||
$info = Database::getInstance()->query(
|
$info = Database::getInstance()->query(
|
||||||
"SELECT * FROM {available_update} WHERE target = :target",
|
"SELECT * FROM {availableupdate} WHERE target = :target",
|
||||||
array(':target' => $target),
|
array(':target' => $target),
|
||||||
array('return_rows' => Database::RETURN_ONE_ROW)
|
array('return_rows' => Database::RETURN_ONE_ROW)
|
||||||
);
|
);
|
||||||
@ -140,7 +140,7 @@ class AvailableUpdate
|
|||||||
public static function all()
|
public static function all()
|
||||||
{
|
{
|
||||||
$rows = Database::getInstance()->query(
|
$rows = Database::getInstance()->query(
|
||||||
"SELECT * FROM {available_update}",
|
"SELECT * FROM {availableupdate}",
|
||||||
null,
|
null,
|
||||||
array('return_rows' => Database::RETURN_ALL_ROWS)
|
array('return_rows' => Database::RETURN_ALL_ROWS)
|
||||||
);
|
);
|
||||||
@ -182,7 +182,7 @@ class AvailableUpdate
|
|||||||
}
|
}
|
||||||
|
|
||||||
Database::getInstance()->query(
|
Database::getInstance()->query(
|
||||||
"DELETE FROM {available_update} WHERE id = :id LIMIT 1",
|
"DELETE FROM {availableupdate} WHERE id = :id LIMIT 1",
|
||||||
array(':id' => $this->id)
|
array(':id' => $this->id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ class AvailableUpdate
|
|||||||
if (!$this->id) {
|
if (!$this->id) {
|
||||||
// This update is new.
|
// This update is new.
|
||||||
$db->query(
|
$db->query(
|
||||||
("INSERT INTO {available_update} (target, version, url, description) "
|
("INSERT INTO {availableupdate} (target, version, url, description) "
|
||||||
. "VALUES (:target, :version, :url, :description)"),
|
. "VALUES (:target, :version, :url, :description)"),
|
||||||
array(
|
array(
|
||||||
':target' => $this->target,
|
':target' => $this->target,
|
||||||
@ -222,7 +222,7 @@ class AvailableUpdate
|
|||||||
} else {
|
} else {
|
||||||
// Update existing update
|
// Update existing update
|
||||||
$db->query(
|
$db->query(
|
||||||
("UPDATE {available_update} SET target = :target, url = :url, "
|
("UPDATE {availableupdate} SET target = :target, url = :url, "
|
||||||
. "version = :version, description = :description "
|
. "version = :version, description = :description "
|
||||||
. "WHERE id = :id"),
|
. "WHERE id = :id"),
|
||||||
array(
|
array(
|
||||||
|
@ -342,7 +342,7 @@ class Updater
|
|||||||
$db->query('ALTER TABLE {locale} ADD UNIQUE KEY code (code)');
|
$db->query('ALTER TABLE {locale} ADD UNIQUE KEY code (code)');
|
||||||
|
|
||||||
// Create a table for available updates.
|
// Create a table for available updates.
|
||||||
$db->query('CREATE TABLE {available_update} ( '
|
$db->query('CREATE TABLE {availableupdate} ( '
|
||||||
. 'id INT NOT NULL auto_increment PRIMARY KEY, '
|
. 'id INT NOT NULL auto_increment PRIMARY KEY, '
|
||||||
. 'target varchar(255) NOT NULL, '
|
. 'target varchar(255) NOT NULL, '
|
||||||
. 'version varchar(255) NOT NULL, '
|
. 'version varchar(255) NOT NULL, '
|
||||||
|
Loading…
Reference in New Issue
Block a user