diff --git a/admin/xmldb/actions/view_table_php/view_table_php.class.php b/admin/xmldb/actions/view_table_php/view_table_php.class.php index b6d5c7daf7e..8626a36ba21 100644 --- a/admin/xmldb/actions/view_table_php/view_table_php.class.php +++ b/admin/xmldb/actions/view_table_php/view_table_php.class.php @@ -919,7 +919,7 @@ class view_table_php extends XMLDBAction { /// Launch the proper DDL $result .= XMLDB_LINEFEED; $result .= ' /// Conditionally launch add index ' . $index->getName() . XMLDB_LINEFEED; - $result .= ' if (!$dbman->index_exists($table, $index) {' . XMLDB_LINEFEED; + $result .= ' if (!$dbman->index_exists($table, $index)) {' . XMLDB_LINEFEED; $result .= ' $dbman->add_index($table, $index);' . XMLDB_LINEFEED; $result .= ' }' . XMLDB_LINEFEED; @@ -967,7 +967,7 @@ class view_table_php extends XMLDBAction { /// Launch the proper DDL $result .= XMLDB_LINEFEED; $result .= ' /// Conditionally launch drop index ' . $index->getName() . XMLDB_LINEFEED; - $result .= ' if ($dbman->index_exists($table, $index) {' . XMLDB_LINEFEED; + $result .= ' if ($dbman->index_exists($table, $index)) {' . XMLDB_LINEFEED; $result .= ' $dbman->drop_index($table, $index);' . XMLDB_LINEFEED; $result .= ' }' . XMLDB_LINEFEED;