mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Update nntmux versions handling
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user