Couple of fixes and missing settings (Sphinx, sabnzbd)

This commit is contained in:
DariusIII
2016-11-08 09:34:35 +01:00
parent 6f06fc4a17
commit 76d23c9544
7 changed files with 21 additions and 12 deletions
+1
View File
@@ -1,4 +1,5 @@
2016-11-08 DariusIII
* Chg: Couple of fixes and missing settings (Sphinx, sabnzbd)
* Chg: Improve performance of site/edit by updating some queries in Groups/Releases
* Chg: Add serch description to search page in all themes
2016-11-07 DariusIII
+5
View File
@@ -271,6 +271,11 @@ class Versions extends \lithium\core\Object
}
}
protected function error($message)
{
// TODO handle console error message.
}
protected function initialiseGit()
{
if (!($this->git instanceof \app\extensions\util\Git)) {
+2 -2
View File
@@ -16,8 +16,8 @@
</last>
</scripts>
<sql>
<db>278</db>
<file>278</file>
<db>279</db>
<file>279</file>
</sql>
</versions>
</nntmux>
+6 -6
View File
@@ -428,7 +428,7 @@ class ReleaseRemover
case ReleaseSearch::SPHINX:
$rs = new ReleaseSearch($this->pdo);
$execFT =
str_replace('=10000;', '=1000000;',
str_replace('=10000;', '=100000;',
$rs->getSearchSQL(
[
'searchname' => '-exes* -exec*',
@@ -482,7 +482,7 @@ class ReleaseRemover
switch (NN_RELEASE_SEARCH_TYPE) {
case ReleaseSearch::SPHINX:
$rs = new ReleaseSearch($this->pdo);
$instbinFT = str_replace('=10000;', '=10000000;', $rs->getSearchSQL(['filename' => 'install<<bin']));
$instbinFT = str_replace('=10000;', '=100000;', $rs->getSearchSQL(['filename' => 'install<<bin']));
$ftJoin = $rs->getFullTextJoinString();
break;
default:
@@ -520,7 +520,7 @@ class ReleaseRemover
switch (NN_RELEASE_SEARCH_TYPE) {
case ReleaseSearch::SPHINX:
$rs = new ReleaseSearch($this->pdo);
$passurlFT = str_replace('=10000;', '=10000000;', $rs->getSearchSQL(['filename' => 'password<<url']));
$passurlFT = str_replace('=10000;', '=100000;', $rs->getSearchSQL(['filename' => 'password<<url']));
$ftJoin = $rs->getFullTextJoinString();
break;
default:
@@ -558,7 +558,7 @@ class ReleaseRemover
switch (NN_RELEASE_SEARCH_TYPE) {
case ReleaseSearch::SPHINX:
$rs = new ReleaseSearch($this->pdo);
$passFT = str_replace('=10000;', '=10000000;', $rs->getSearchSQL(['searchname' => 'passwor*']));
$passFT = str_replace('=10000;', '=100000;', $rs->getSearchSQL(['searchname' => 'passwor*']));
$ftJoin = $rs->getFullTextJoinString();
break;
default:
@@ -677,7 +677,7 @@ class ReleaseRemover
switch (NN_RELEASE_SEARCH_TYPE) {
case ReleaseSearch::SPHINX:
$rs = new ReleaseSearch($this->pdo);
$sampleFT = str_replace('=10000;', '=10000000;', $rs->getSearchSQL(['name' => 'sample']));
$sampleFT = str_replace('=10000;', '=100000;', $rs->getSearchSQL(['name' => 'sample']));
$ftJoin = $rs->getFullTextJoinString();
break;
default:
@@ -732,7 +732,7 @@ class ReleaseRemover
switch (NN_RELEASE_SEARCH_TYPE) {
case ReleaseSearch::SPHINX:
$rs = new ReleaseSearch($this->pdo);
$scrFT = str_replace('=10000;', '=10000000;', $rs->getSearchSQL(['(name,filename)' => 'scr']));
$scrFT = str_replace('=10000;', '=100000;', $rs->getSearchSQL(['(name,filename)' => 'scr']));
$ftJoin = $rs->getFullTextJoinString();
break;
default:
+4 -4
View File
@@ -100,8 +100,8 @@ class SABnzbd
$this->apikey = $_COOKIE['sabnzbd_' . $this->uid . '__apikey'];
$this->priority = (isset($_COOKIE['sabnzbd_' . $this->uid . '__priority'])) ? $_COOKIE['sabnzbd_' . $this->uid . '__priority'] : 0;
$this->apikeytype = (isset($_COOKIE['sabnzbd_' . $this->uid . '__apitype'])) ? $_COOKIE['sabnzbd_' . $this->uid . '__apitype'] : 1;
} else if (!empty($page->userdata['sabapikey']) && !empty($page->userdata['saburl'])) {
$this->url = $page->userdata['saburl'];
} else if (!empty($page->userdata['sabapikey']) && !empty($page->userdata['apps.sabnzbplus.url'])) {
$this->url = $page->userdata['apps.sabnzbplus.url'];
$this->apikey = $page->userdata['sabapikey'];
$this->priority = $page->userdata['sabpriority'];
$this->apikeytype = $page->userdata['sabapikeytype'];
@@ -119,8 +119,8 @@ class SABnzbd
break;
case self::INTEGRATION_TYPE_SITEWIDE:
if ((Settings::value('apps.sabnzbplus.apikey') != '') && (Settings::value('saburl') != '')) {
$this->url = Settings::value('saburl');
if ((Settings::value('apps.sabnzbplus.apikey') != '') && (Settings::value('apps.sabnzbplus.url') != '')) {
$this->url = Settings::value('apps.sabnzbplus.url');
$this->apikey = Settings::value('apps.sabnzbplus.apikey');
$this->priority = Settings::value('apps.sabnzbplus.priority');
$this->apikeytype = Settings::value('apps.sabnzbplus.apikeytype');
@@ -0,0 +1,3 @@
# Add missing saburl setting
UPDATE settings SET section = 'apps', subsection = 'sabnzbplus', name = 'url' WHERE setting = 'saburl';