mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Fix DbUpdate not updating nntmux.xml properly
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
</last>
|
</last>
|
||||||
</scripts>
|
</scripts>
|
||||||
<sql>
|
<sql>
|
||||||
<db>314</db>
|
<db>315</db>
|
||||||
<file>315</file>
|
<file>315</file>
|
||||||
</sql>
|
</sql>
|
||||||
</versions>
|
</versions>
|
||||||
|
|||||||
@@ -165,6 +165,8 @@ class DbUpdate
|
|||||||
* numbers to order them. i.e. +1~settings.sql, +2~predb.sql, etc.
|
* numbers to order them. i.e. +1~settings.sql, +2~predb.sql, etc.
|
||||||
*
|
*
|
||||||
* @param array $options
|
* @param array $options
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function newPatches(array $options = [])
|
public function newPatches(array $options = [])
|
||||||
{
|
{
|
||||||
@@ -195,7 +197,7 @@ class DbUpdate
|
|||||||
} else {
|
} else {
|
||||||
echo $this->log->header('Processing patch file: ' . $file);
|
echo $this->log->header('Processing patch file: ' . $file);
|
||||||
$this->splitSQL($file, ['local' => $local, 'data' => $options['data']]);
|
$this->splitSQL($file, ['local' => $local, 'data' => $options['data']]);
|
||||||
$current = (integer)Settings::value('..sqlpatch');
|
$current = Settings::value('..sqlpatch');
|
||||||
$current++;
|
$current++;
|
||||||
$this->pdo->queryExec("UPDATE settings SET value = '$current' WHERE setting = 'sqlpatch';");
|
$this->pdo->queryExec("UPDATE settings SET value = '$current' WHERE setting = 'sqlpatch';");
|
||||||
$newName = $matches['drive'] . $matches['path'] .
|
$newName = $matches['drive'] . $matches['path'] .
|
||||||
@@ -248,7 +250,7 @@ class DbUpdate
|
|||||||
$patch,
|
$patch,
|
||||||
$matches)
|
$matches)
|
||||||
) {
|
) {
|
||||||
$patch = (integer)$matches['patch'];
|
$patch = (int)$matches['patch'];
|
||||||
} else {
|
} else {
|
||||||
throw new \RuntimeException("No patch information available, stopping!!");
|
throw new \RuntimeException("No patch information available, stopping!!");
|
||||||
}
|
}
|
||||||
@@ -259,7 +261,7 @@ class DbUpdate
|
|||||||
}
|
}
|
||||||
$this->splitSQL($file, ['local' => $local, 'data' => $data]);
|
$this->splitSQL($file, ['local' => $local, 'data' => $data]);
|
||||||
if ($setPatch) {
|
if ($setPatch) {
|
||||||
$this->pdo->queryExec("UPDATE settings SET value = '$patch' WHERE setting = 'sqlpatch';");
|
Settings::query()->where('setting', '=', 'sqlpatch')->update(['value' => $patch]);
|
||||||
}
|
}
|
||||||
$patched++;
|
$patched++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user