src/ORM/DB.php
public static function valid_alternative_database_name($name)
    {
        if (Director::isLive() || empty($name)) {
            return false;
        }

        $prefix = Environment::getEnv('SS_DATABASE_PREFIX') ?: 'ss_';
        $pattern = strtolower(sprintf('/^%stmpdb\d{7}$/', $prefix));
        return (bool)preg_match($pattern, $name);
    }
public static function valid_alternative_database_name($name)
    {
        if (Director::isLive() || empty($name)) {
            return false;
        }

        $prefix = Environment::getEnv('SS_DATABASE_PREFIX') ?: 'ss_';
        $pattern = strtolower(sprintf('/^%stmpdb\d{7}$/', $prefix));
        return (bool)preg_match($pattern, $name);
    }
public static function valid_alternative_database_name ( $ name ) { if ( Director :: isLive ( ) || empty ( $ name ) ) { return false ; } $ prefix = Environment :: getEnv ( 'SS_DATABASE_PREFIX' ) ? : 'ss_' ; $ pattern = strtolower ( sprintf ( '/^%stmpdb\d{7}$/' , $ prefix ) ) ; return ( bool ) preg_match ( $ pattern , $ name ) ; }
Determines if the name is valid, as a security
measure against setting arbitrary databases.

@param string $name
@return bool
Determines if the name is valid as a security measure against setting arbitrary databases .