diff --git a/Changelog b/Changelog index d742dae55..4e97f7837 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2016-05-04 DariusIII + * Upd: NNTmux versions handling * Upd: Update db function in Update script. * Fix: Force li3 connections to ignore Host/Port settings if a socket is provided. * Upd: Add patch for triggers to match the new releases reqid format (@rainje) diff --git a/app/extensions/util/Versions.php b/app/extensions/util/Versions.php index 922835971..939eec414 100644 --- a/app/extensions/util/Versions.php +++ b/app/extensions/util/Versions.php @@ -68,7 +68,13 @@ class Versions extends \lithium\core\Object public function getSQLPatchFromDB() { - return Settings::find('setting', ['conditions' => '..sqlpatch']); + $dbVersion = Settings::value('..sqlpatch', true); + + if (!is_numeric($dbVersion)) { + throw new \Exception('Bad sqlpatch value'); + } + + return $dbVersion; } public function getSQLPatchFromFile() @@ -99,7 +105,7 @@ class Versions extends \lithium\core\Object } if ($this->xml->count() > 0) { - $vers = $this->xml->xpath('/newznab/versions'); + $vers = $this->xml->xpath('/nntmux/versions'); if ($vers[0]->count() == 0) { $this->error("Your versions XML file ($versions) does not contain version info, try updating from git."); diff --git a/build/nntmux.xml b/build/nntmux.xml index 02b39e9f7..35e6cd9f1 100755 --- a/build/nntmux.xml +++ b/build/nntmux.xml @@ -1,5 +1,5 @@ - + 0.0.0 @@ -20,4 +20,4 @@ 244 - + diff --git a/newznab/utility/Versions.php b/newznab/utility/Versions.php index 147e9b605..362de4e95 100644 --- a/newznab/utility/Versions.php +++ b/newznab/utility/Versions.php @@ -264,7 +264,7 @@ class Versions } if ($this->_xml->count() > 0) { - $vers = $this->_xml->xpath('/newznab/versions'); + $vers = $this->_xml->xpath('/nntmux/versions'); if ($vers[0]->count() == 0) { $this->out->error("Your versions XML file ({NN_VERSIONS}) does not contain version info, try updating from git.");