Updated the LaTeX header for letters
[civicrm-core.git] / install / index.php
index 34913643ba95515d68de694100363224c6c5334f..a7c96f1f2e00bc3508d4520a867a7811b0d584b6 100644 (file)
@@ -254,7 +254,7 @@ else {
 
 if ($installType == 'drupal') {
   // Ensure that they have downloaded the correct version of CiviCRM
-  if ($civicrm_version['cms'] != 'Drupal' && $civicrm_version['cms'] != 'Drupal6') {
+  if ($civicrm_version['cms'] != 'Drupal') {
     $errorTitle = ts("Oops! Incorrect CiviCRM version");
     $errorMsg = ts("This installer can only be used for the Drupal version of CiviCRM.");
     errorDisplayPage($errorTitle, $errorMsg);
@@ -839,7 +839,7 @@ class InstallRequirements {
   }
 
   /**
-   * @param null $section
+   * @param string|null $section
    */
   public function showTable($section = NULL) {
     if ($section) {
@@ -1069,8 +1069,14 @@ class InstallRequirements {
         return TRUE;
       }
       else {
-        $testDetails[2] .= "{$majorHas}.{$minorHas}.";
-        $this->error($testDetails);
+        $versionDetails = mysqli_query($this->conn, 'SELECT version() as version')->fetch_assoc();
+        if (version_compare($versionDetails['version'], $version) == -1) {
+          $testDetails[2] .= "{$majorHas}.{$minorHas}.";
+          $this->error($testDetails);
+        }
+        else {
+          return TRUE;
+        }
       }
     }
   }