Update nntmux versions handling

This commit is contained in:
DariusIII
2016-05-04 11:02:20 +02:00
parent f7aa76e697
commit 9545a882f0
4 changed files with 12 additions and 5 deletions
+1
View File
@@ -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)
+8 -2
View File
@@ -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.");
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<newznab>
<nntmux>
<versions>
<git>
<tag>0.0.0</tag>
@@ -20,4 +20,4 @@
<file>244</file>
</sql>
</versions>
</newznab>
</nntmux>
+1 -1
View File
@@ -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.");