diff --git a/misc/testing/Dev/test_posters.php b/misc/testing/Dev/test_posters.php index e69de29bb..12629482d 100644 --- a/misc/testing/Dev/test_posters.php +++ b/misc/testing/Dev/test_posters.php @@ -0,0 +1,13 @@ +getAllPosters(), "','"); + +var_dump($posters); \ No newline at end of file diff --git a/nntmux/ReleasesMultiGroup.php b/nntmux/ReleasesMultiGroup.php index 2acc3e886..89f689dae 100644 --- a/nntmux/ReleasesMultiGroup.php +++ b/nntmux/ReleasesMultiGroup.php @@ -2,12 +2,10 @@ namespace nntmux; -use ApaiIO\Request\Util; use app\models\ReleasesGroups; use app\models\Settings; use nntmux\db\DB; use nntmux\processing\ProcessReleases; -use nntmux\utility\Utility; class ReleasesMultiGroup diff --git a/nntmux/processing/ProcessReleases.php b/nntmux/processing/ProcessReleases.php index 531c6f57c..6750e2cce 100755 --- a/nntmux/processing/ProcessReleases.php +++ b/nntmux/processing/ProcessReleases.php @@ -771,7 +771,7 @@ class ProcessReleases $this->pdo->log->doEcho($this->pdo->log->header("Process Releases -> Create the NZB, delete collections/binaries/parts.")); } $relMgrp = new ReleasesMultiGroup(); - $posters = Utility::convertMultiArray($relMgrp->getAllPosters()); + $posters = Utility::convertMultiArray($relMgrp->getAllPosters(), "','"); $releases = $this->pdo->queryDirect( sprintf(" SELECT SQL_NO_CACHE CONCAT(COALESCE(cp.title,'') , CASE WHEN cp.title IS NULL THEN '' ELSE ' > ' END , c.title) AS title, diff --git a/nntmux/utility/Utility.php b/nntmux/utility/Utility.php index 74b6dcc6a..61ab3dc56 100755 --- a/nntmux/utility/Utility.php +++ b/nntmux/utility/Utility.php @@ -1112,14 +1112,17 @@ class Utility } /** + * Convert multi to single dimensional array * Code taken from http://stackoverflow.com/a/12309103 * * @param $array * + * @param $separator + * * @return string */ - public static function convertMultiArray($array) + public static function convertMultiArray($array, $separator) { - return implode(",",array_map(function($a) {return implode(",",$a);},$array)); + return implode("$separator",array_map(function($a) {return implode(",",$a);},$array)); } }