<commit_before><?php
if ( !defined( 'MEDIAWIKI' ) ) {
	exit( 1 );
}

/**
 * // Example configuration
 * // These should be set before the extension is loaded......
 *
 * $wgCreateWikiPublicDbListLocation = "/srv/foo/dblist.public";
 * $wgCreateWikiPrivateDbListLocation = "/srv/foo/dblist.private";
 * $wgCreateWikiBaseDomain = 'orain.org'
 * $wgCreateWikiUseCloudFlare = true;
 * $wgCloudFlareUser = 'foo';
 * $wgCloudFlareKey = 'bar';
 */

// If the extension doen't appear to be configured correctly then die :/
if ( !isset( $wgCreateWikiPublicDbListLocation ) ||
	!isset( $wgCreateWikiPrivateDbListLocation ) ||
	!isset( $wgCreateWikiBaseDomain )
) {
	throw new Exception( 'CreateWiki not configured correctly!' );
}

$wgExtensionCredits['specialpage'][] = array(
	'author' => 'Southparkfan & Kudu',
	'descriptionmsg' => 'createwiki-desc',
	'name' => 'CreateWiki',
	'path' => __FILE__,
	'url' => '//github.com/Orain/CreateWiki'
);

$wgAutoloadClasses['cloudflare_api'] = __DIR__ . '/lib/class_cloudflare.php';
$wgAutoloadClasses['SpecialCreateWiki'] = __DIR__ . '/SpecialCreateWiki.php';
$wgAutoloadClasses['CreateWikiHooks'] = __DIR__ . '/CreateWiki.hooks.php';
$wgAutoloadClasses['RequestWikiQueuePager'] = __DIR__ . '/RequestWikiQueuePager.php';
$wgAutoloadClasses['SpecialRequestWiki'] = __DIR__ . '/SpecialRequestWiki.php';
$wgAutoloadClasses['SpecialRequestWikiQueue'] = __DIR__ . '/SpecialRequestWikiQueue.php';

$wgExtensionMessagesFiles['CreateWiki'] = dirname( __FILE__ ) . '/CreateWiki.i18n.php';
$wgMessagesDirs['CreateWiki'] = __DIR__ . '/i18n';

$wgExtensionMessagesFiles['CreateWikiAlias'] = __DIR__ . '/CreateWiki.alias.php';

$wgSpecialPages['CreateWiki'] = 'SpecialCreateWiki';
$wgSpecialPages['RequestWiki'] = 'SpecialRequestWiki';
$wgSpecialPages['RequestWikiQueue'] = 'SpecialRequestWikiQueue';

$wgHooks['LoadExtensionSchemaUpdates'][] = 'CreateWikiHooks::fnCreateWikiSchemaUpdates';
<commit_msg>silet death after bad config<commit_after><?php
if ( !defined( 'MEDIAWIKI' ) ) {
	exit( 1 );
}

/**
 * // Example configuration
 * // These should be set before the extension is loaded......
 *
 * $wgCreateWikiPublicDbListLocation = "/srv/foo/dblist.public";
 * $wgCreateWikiPrivateDbListLocation = "/srv/foo/dblist.private";
 * $wgCreateWikiBaseDomain = 'orain.org'
 * $wgCreateWikiUseCloudFlare = true;
 * $wgCloudFlareUser = 'foo';
 * $wgCloudFlareKey = 'bar';
 */

// If the extension doen't appear to be configured correctly then die :/
if ( !isset( $wgCreateWikiPublicDbListLocation ) ||
	!isset( $wgCreateWikiPrivateDbListLocation ) ||
	!isset( $wgCreateWikiBaseDomain )
) {
	wfDebugLog( 'CreateWiki', 'Extension not loaded as config incorrect' );
	return;
}

$wgExtensionCredits['specialpage'][] = array(
	'author' => 'Southparkfan & Kudu',
	'descriptionmsg' => 'createwiki-desc',
	'name' => 'CreateWiki',
	'path' => __FILE__,
	'url' => '//github.com/Orain/CreateWiki'
);

$wgAutoloadClasses['cloudflare_api'] = __DIR__ . '/lib/class_cloudflare.php';
$wgAutoloadClasses['SpecialCreateWiki'] = __DIR__ . '/SpecialCreateWiki.php';
$wgAutoloadClasses['CreateWikiHooks'] = __DIR__ . '/CreateWiki.hooks.php';
$wgAutoloadClasses['RequestWikiQueuePager'] = __DIR__ . '/RequestWikiQueuePager.php';
$wgAutoloadClasses['SpecialRequestWiki'] = __DIR__ . '/SpecialRequestWiki.php';
$wgAutoloadClasses['SpecialRequestWikiQueue'] = __DIR__ . '/SpecialRequestWikiQueue.php';

$wgExtensionMessagesFiles['CreateWiki'] = dirname( __FILE__ ) . '/CreateWiki.i18n.php';
$wgMessagesDirs['CreateWiki'] = __DIR__ . '/i18n';

$wgExtensionMessagesFiles['CreateWikiAlias'] = __DIR__ . '/CreateWiki.alias.php';

$wgSpecialPages['CreateWiki'] = 'SpecialCreateWiki';
$wgSpecialPages['RequestWiki'] = 'SpecialRequestWiki';
$wgSpecialPages['RequestWikiQueue'] = 'SpecialRequestWikiQueue';

$wgHooks['LoadExtensionSchemaUpdates'][] = 'CreateWikiHooks::fnCreateWikiSchemaUpdates';

{'fraction_non_alphanumeric': 0.1612071189063709, 'fraction_numerical': 0.0025793139025019345, 'mean_word_length': 6.400763358778626, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '5780776', 'n_tokens_mistral': 1397, 'n_tokens_neox': 1341, 'n_words': 212}