summaryrefslogtreecommitdiff
path: root/includes/install.core.inc
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-09-30 15:08:10 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-09-30 15:08:10 -0700
commit25a927031c218d7bd49da1bad5f97bef690a7518 (patch)
treef60cbcc9d9aabc492193442ab555dce753bd1fc6 /includes/install.core.inc
parente120a6e886a40eaf135f6032aa47e3eeeb58b3af (diff)
downloadbrdo-25a927031c218d7bd49da1bad5f97bef690a7518.tar.gz
brdo-25a927031c218d7bd49da1bad5f97bef690a7518.tar.bz2
Issue #1289364 by swentel: Fixed SchemaCache generates empty cid.
Diffstat (limited to 'includes/install.core.inc')
-rw-r--r--includes/install.core.inc22
1 files changed, 16 insertions, 6 deletions
diff --git a/includes/install.core.inc b/includes/install.core.inc
index a74dfdf0f..094c9b871 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -710,8 +710,10 @@ function install_display_output($output, $install_state) {
*
* @return
* A themed status report, or an exception if there are requirement errors.
- * Otherwise, no output is returned, so that the next task can be run
- * in the same page request.
+ * If there are only requirement warnings, a themed status report is shown
+ * initially, but the user is allowed to bypass it by providing 'continue=1'
+ * in the URL. Otherwise, no output is returned, so that the next task can be
+ * run in the same page request.
*/
function install_verify_requirements(&$install_state) {
// Check the installation requirements for Drupal and this profile.
@@ -723,22 +725,30 @@ function install_verify_requirements(&$install_state) {
// Check the severity of the requirements reported.
$severity = drupal_requirements_severity($requirements);
- if ($severity == REQUIREMENT_ERROR) {
+ // If there are errors, always display them. If there are only warnings, skip
+ // them if the user has provided a URL parameter acknowledging the warnings
+ // and indicating a desire to continue anyway. See drupal_requirements_url().
+ if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && empty($install_state['parameters']['continue']))) {
if ($install_state['interactive']) {
drupal_set_title(st('Requirements problem'));
$status_report = theme('status_report', array('requirements' => $requirements));
- $status_report .= st('Check the error messages and <a href="!url">proceed with the installation</a>.', array('!url' => check_url(request_uri())));
+ $status_report .= st('Check the error messages and <a href="!url">proceed with the installation</a>.', array('!url' => check_url(drupal_requirements_url($severity))));
return $status_report;
}
else {
- // Throw an exception showing all unmet requirements.
+ // Throw an exception showing any unmet requirements.
$failures = array();
foreach ($requirements as $requirement) {
+ // Skip warnings altogether for non-interactive installations; these
+ // proceed in a single request so there is no good opportunity (and no
+ // good method) to warn the user anyway.
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
$failures[] = $requirement['title'] . ': ' . $requirement['value'] . "\n\n" . $requirement['description'];
}
}
- throw new Exception(implode("\n\n", $failures));
+ if (!empty($failures)) {
+ throw new Exception(implode("\n\n", $failures));
+ }
}
}
}