예제 #1
0
파일: mahara.php 프로젝트: kienv/mahara
function ensure_upgrade_sanity()
{
    // Check column collation is equal to the default
    if (is_mysql()) {
        require_once 'ddl.php';
        if (table_exists(new XMLDBTable('event_type'))) {
            if (!column_collation_is_default('event_type', 'name')) {
                throw new ConfigSanityException(get_string('dbcollationmismatch', 'admin'));
            }
        }
        if (!mysql_has_trigger_privilege()) {
            throw new ConfigSanityException(get_string('mysqlnotriggerprivilege', 'error'));
        }
    }
    if (is_postgres() && !postgres_create_language('plpgsql')) {
        throw new ConfigSanityException(get_string('plpgsqlnotavailable', 'error'));
    }
}
예제 #2
0
function ensure_upgrade_sanity()
{
    // Check column collation is equal to the default
    if (is_mysql()) {
        require_once 'ddl.php';
        if (table_exists(new XMLDBTable('event_type'))) {
            if (!column_collation_is_default('event_type', 'name')) {
                throw new ConfigSanityException(get_string('dbcollationmismatch', 'admin'));
            }
        }
    }
}