Closed gadgetto closed 10 years ago
Works fine on the modmore site:
[[!getIssues? &label=`Publicly Visible` &fromUser=`modmore` &forRepo=`Redactor` &tpl=`githubIssue`]]
</p>
<h3>Closed Issues</h3>
<ul>
[[!getIssues? &label=`Publicly Visible` &fromUser=`modmore` &forRepo=`Redactor` &tpl=`githubClosedIssue` &state=`closed`]]
</ul>
Hmm... can't see any relevant difference. Really don't know why this doesn't work here.
Mark, I built the transport package from the current develop branch (which is a little bit ahead of the master). Could this be the difference/problem?
Found the bug:
function sortMe(&$array, $column, $sortDir)
{
$sortDir = strtoupper($sortDir);
// Grab a sorted array
$sorted = array();
foreach ($array as $key => $row) {
$sorted[$key] = $row[$column];
}
// Sort the original array accordingly
array_multisort($sorted, constant($sortDir), $array);
}
needs to be:
if (!function_exists('sortMe')) {
function sortMe(&$array, $column, $sortDir)
{
$sortDir = strtoupper($sortDir);
// Grab a sorted array
$sorted = array();
foreach ($array as $key => $row) {
$sorted[$key] = $row[$column];
}
// Sort the original array accordingly
array_multisort($sorted, constant($sortDir), $array);
}
}
Probably it's again me - but If I try to use the getIssues Snippet more then once in a Resource, the result is a blank page. Single usage works like a charm!
Here is the code I'm using in the Resource: