<commit_before>package ufront.ufadmin.modules;

import ufront.ufadmin.UFAdminModule;

class DBAdminModule extends UFAdminModule {
	public function new() {
		super( "db", "Database Admin" );
	}

	override public function checkPermissions() {
		// Currently anyone who has access to ufadmin has access to this DBAdminModule.
		return true;
	}

	@:route("/*")
	public function doDefault() {
		#if server
			if ( sys.db.Manager.cnx==null ) {
				return 'No Database Connection Found';
			}
			else {
				spadm.AdminStyle.BASE_URL = baseUri;
				ufront.spadm.DBAdmin.handler(baseUri);
				context.completion.set( CRequestHandlersComplete );
				context.completion.set( CFlushComplete );
				return null;
			}
		#elseif
			return 'DBAdminModule is not available on the client';
		#end
	}
}
<commit_msg>Support URL filters in DBAdminModule<commit_after>package ufront.ufadmin.modules;

import ufront.ufadmin.UFAdminModule;

class DBAdminModule extends UFAdminModule {
	public function new() {
		super( "db", "Database Admin" );
	}

	override public function checkPermissions() {
		// Currently anyone who has access to ufadmin has access to this DBAdminModule.
		return true;
	}

	@:route("/*")
	public function doDefault() {
		#if server
			if ( sys.db.Manager.cnx==null ) {
				return 'No Database Connection Found';
			}
			else {
				var base = context.generateUri( baseUri.substr(1) );
				spadm.AdminStyle.BASE_URL = base;
				ufront.spadm.DBAdmin.handler(base);
				context.completion.set( CRequestHandlersComplete );
				context.completion.set( CFlushComplete );
				return null;
			}
		#elseif
			return 'DBAdminModule is not available on the client';
		#end
	}
}

{'fraction_non_alphanumeric': 0.1056422569027611, 'fraction_numerical': 0.0006002400960384153, 'mean_word_length': 3.7492877492877494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2756230', 'n_tokens_mistral': 608, 'n_tokens_neox': 524, 'n_words': 140}