From: stronk7 Date: Mon, 9 Jul 2007 18:03:47 +0000 (+0000) Subject: Now SQL sentences are all together and with proper terminators. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=72e42141cf89a1c12f078a9716528bf5006d330a;p=moodle.git Now SQL sentences are all together and with proper terminators. Tested against MySQL, PostgreSQL and MSSQL. MDL-7357 --- diff --git a/admin/xmldb/actions/check_indexes/check_indexes.class.php b/admin/xmldb/actions/check_indexes/check_indexes.class.php index 8ad40b12fd..db2fcf0185 100644 --- a/admin/xmldb/actions/check_indexes/check_indexes.class.php +++ b/admin/xmldb/actions/check_indexes/check_indexes.class.php @@ -222,6 +222,7 @@ class check_indexes extends XMLDBAction { } /// We have finished, let's show the results of the search + $s = ''; $r = ''; $r.= ' '; $r.= ' '; $r.= '
'; $r.= '

' . $this->str['searchresults'] . '

'; @@ -236,18 +237,21 @@ class check_indexes extends XMLDBAction { foreach ($missing_indexes as $obj) { $xmldb_table = $obj->table; $xmldb_index = $obj->index; - $sqlarr = $xmldb_table->getAddIndexSQL($CFG->dbtype, $CFG->prefix, $xmldb_index, false); + $sqlarr = $xmldb_table->getAddIndexSQL($CFG->dbtype, $CFG->prefix, $xmldb_index, true); $r.= '
  • ' . $this->str['table'] . ': ' . $xmldb_table->getName() . '. ' . - $this->str['index'] . ': ' . $xmldb_index->readableInfo() . '
    ' . - '

    ' . implode('
    ', $sqlarr) . '

  • '; + $this->str['index'] . ': ' . $xmldb_index->readableInfo() . ''; + $s.= '' . str_replace("\n", '
    ', implode('
    ', $sqlarr)) . '

    '; } $r.= ' '; + /// Add the SQL statements (all together) + $r.= '
    ' . $s; } else { $r.= '

    ' . $this->str['nomissingindexesfound'] . '

    '; } $r.= '
    '; + /// Add the complete log message $r.= '

    ' . $this->str['completelogbelow'] . '

    '; $r.= '
    ';