diff options
| author | Andrew Dolgov <noreply@fakecake.org> | 2021-02-24 21:56:52 +0300 |
|---|---|---|
| committer | Andrew Dolgov <noreply@fakecake.org> | 2021-02-24 21:56:52 +0300 |
| commit | 93940d2a9f80d9e1dac49b5eb7db23230d31c5f6 (patch) | |
| tree | 71016661f6017918d0934eb462bd9552018d557a /classes/dbupdater.php | |
| parent | 8b022c2bfb356d7dddaf334bc931d6dec77086fb (diff) | |
| parent | 1adacd057230aea4ede29dab510385bf01cf99a3 (diff) | |
Merge branch 'master' of git.fakecake.org:fox/tt-rss into weblate-integration
Diffstat (limited to 'classes/dbupdater.php')
| -rw-r--r-- | classes/dbupdater.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/classes/dbupdater.php b/classes/dbupdater.php index 3cc6e9125..e923c7fcb 100644 --- a/classes/dbupdater.php +++ b/classes/dbupdater.php @@ -11,16 +11,16 @@ class DbUpdater { $this->need_version = (int) $need_version; } - function getSchemaVersion() { + function get_schema_version() { $row = $this->pdo->query("SELECT schema_version FROM ttrss_version")->fetch(); return (int) $row['schema_version']; } - function isUpdateRequired() { - return $this->getSchemaVersion() < $this->need_version; + function is_update_required() { + return $this->get_schema_version() < $this->need_version; } - function getSchemaLines($version) { + function get_schema_lines($version) { $filename = "schema/versions/".$this->db_type."/$version.sql"; if (file_exists($filename)) { @@ -31,10 +31,10 @@ class DbUpdater { } } - function performUpdateTo($version, $html_output = true) { - if ($this->getSchemaVersion() == $version - 1) { + function update_to($version, $html_output = true) { + if ($this->get_schema_version() == $version - 1) { - $lines = $this->getSchemaLines($version); + $lines = $this->get_schema_lines($version); if (is_array($lines)) { @@ -63,7 +63,7 @@ class DbUpdater { } } - $db_version = $this->getSchemaVersion(); + $db_version = $this->get_schema_version(); if ($db_version == $version) { $this->pdo->commit(); |