1 installer.pages.inc | installer_browser_type_from_path($incoming_path = NULL) |
Determine the project type from a given internal path.
Parameters
string $incoming_path: The path from which the project type should be determined, or NULL to base the type from the current path.
File
- core/
modules/ installer/ installer.pages.inc, line 402 - Page callbacks used by the Installer browse pages.
Code
function installer_browser_type_from_path($incoming_path = NULL) {
if (!isset($incoming_path)) {
if (isset($_GET['destination'])) {
$incoming_path = $_GET['destination'];
}
else {
$incoming_path = $_GET['q'];
}
}
if (strpos($incoming_path, 'appearance')) {
$project_type = 'theme';
}
elseif (strpos($incoming_path, 'layouts')) {
$project_type = 'layout';
}
else {
$project_type = 'module';
}
return $project_type;
}