install_select_profile
./install.php, строка 388
- Версии
- 5 – 6
install_select_profile()
Find all .profile files and allow admin to select which to install.
Возвращаемое значение
The selected profile.
Код
<?php
function install_select_profile() {
include_once './includes/form.inc';
$profiles = file_scan_directory('./profiles', '\.profile$', array('.', '..', 'CVS'), 0, TRUE, 'name', 0);
// Don't need to choose profile if only one available.
if (sizeof($profiles) == 1) {
$profile = array_pop($profiles);
require_once $profile->filename;
return $profile->name;
}
elseif (sizeof($profiles) > 1) {
foreach ($profiles as $profile) {
if ($_POST['profile'] == $profile->name) {
return $profile->name;
}
}
drupal_maintenance_theme();
drupal_set_title(st('Select an installation profile'));
print theme('install_page', drupal_get_form('install_select_profile_form', $profiles));
exit;
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии