Skip to content

Commit

Permalink
Fix for drone
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Dec 13, 2024
1 parent 1ba336f commit d9c564f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
24 changes: 13 additions & 11 deletions administrator/modules/mod_guidedtours/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
elseif (in_array($extension, $tour->extensions)) :
if ($extension === 'com_categories') :
// Special case for the categories page, where the context is complemented with the extension the categories apply to
if ($uri->getVar('option', '') === 'com_categories') {
if ($uri->getVar('option', '') === 'com_categories') :
if ($uri->getVar('extension', '') === $app->getInput()->get('extension', '')) :
if ($contextCount > 0) :
$contextTours[] = $tour;
Expand All @@ -52,18 +52,20 @@
$listTours[] = $tour;
$toursCount--;
endif;
} elseif (in_array($app->getInput()->get('extension', ''), $tour->extensions)) {
if ($contextCount > 0) :
$contextTours[] = $tour;
$contextCount--;
else :
if (in_array($app->getInput()->get('extension', ''), $tour->extensions)) :
if ($contextCount > 0) :
$contextTours[] = $tour;
$contextCount--;
endif;
elseif ($toursCount > 0) :
$listTours[] = $tour;
$toursCount--;
endif;
}
elseif ($toursCount > 0) :
$listTours[] = $tour;
$toursCount--;
endif;
elseif ($contextCount > 0) :
$contextTours[] = $tour;
$contextCount--;
$contextTours[] = $tour;
$contextCount--;
endif;
elseif ($toursCount > 0) :
$listTours[] = $tour;
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
require_once JPATH_LIBRARIES . '/loader.php';

// If JLoader still does not exist panic.
throw new RuntimeException('Joomla Platform not loaded.');
if (!class_exists('JLoader')) {
throw new RuntimeException('Joomla Platform not loaded.');
}
}

// Setup the autoloaders.
Expand Down

0 comments on commit d9c564f

Please sign in to comment.