<commit_before><?php
require __DIR__.'/config_with_app.php';
// Create services and inject into the app. 
$di  = new \Anax\DI\CDIFactoryMango();

$app = new \Anax\MVC\CApplicationBasic($di);

$url = $app->url->create('reset-user');
$url2 = $app->url->create('reset-kommentarer');

$currentUrl = $app->request->getCurrentUrl();

if ( $app->url->getUrlType() != 'clean' ){
    $pageUrl = explode( 'webroot/firstTime.php/', $currentUrl); 
} else {
    $pageUrl = explode( 'webroot/', $currentUrl); 
}

if ( !isset( $pageUrl[1])){
    $site = 'home';
} else {
    $site = $pageUrl[1];
}

$tmp = explode( '/', $site );

$page     = ( isset( $tmp[0] ) ) ? $tmp[0] : null;

$CViewsComments = new Mango\Views\CViewsComments( $app );
$user = null;
$comment = null;

if ( $page == 'reset-user'){
    $CViewsComments->prepareDatabase( $app, 'user');
    $user = '.......... Skapar databas';
    
} else if ( $page == 'reset-kommentarer'){
    $CViewsComments->prepareDatabase( $app, 'comments');
    $comment = '.......... Skapar databas<br />';
}

?>
<html>
    <title>WGTOTW</title>
    <meta charset='utf-8'/>
    <body>
        <h1>Skapa databas</h1>
        <p><a href='<?=$url?>'>Skapa/Återställ tabell för användare</a></p>
        <p><?=$user?></p>
        <p><a href='<?=$url2?>'>Skapa/Återställ tabell för kommentarer</a></p>
        <p><?=$comment?></p>
    </body>
</html><commit_msg>firsttime<commit_after><?php
require __DIR__.'/config_with_app.php';
// Create services and inject into the app. 
$di  = new \Anax\DI\CDIFactoryMango();

$app = new \Anax\MVC\CApplicationBasic($di);

$url = $app->url->create('reset-user');
$url2 = $app->url->create('reset-kommentarer');

$currentUrl = $app->request->getCurrentUrl();

if ( $app->url->getUrlType() != 'clean' ){
    $pageUrl = explode( 'webroot/firstTime.php/', $currentUrl); 
} else {
    $pageUrl = explode( 'webroot/', $currentUrl); 
}

if ( !isset( $pageUrl[1])){
    $site = 'home';
} else {
    $site = $pageUrl[1];
}

$tmp = explode( '/', $site );

$page     = ( isset( $tmp[0] ) ) ? $tmp[0] : null;

$CViewsComments = new Mango\Views\CViewsComments( $app );
$user = null;
$comment = null;

if ( $page == 'reset-user'){
    $CViewsComments->prepareDatabase( $app, 'user');
    $user = '.......... Skapar databas';
    
} else if ( $page == 'reset-kommentarer'){
    $CViewsComments->prepareDatabase( $app, 'comment');
    $comment = '.......... Skapar databas<br />';
}

?>
<html>
    <title>WGTOTW</title>
    <meta charset='utf-8'/>
    <body>
        <h1>Skapa databas</h1>
        <p><a href='<?=$url?>'>Skapa/Återställ tabell för användare</a></p>
        <p><?=$user?></p>
        <p><a href='<?=$url2?>'>Skapa/Återställ tabell för kommentarer</a></p>
        <p><?=$comment?></p>
    </body>
</html>
{'fraction_non_alphanumeric': 0.24014466546112115, 'fraction_numerical': 0.0065099457504520794, 'mean_word_length': 3.301710730948678, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 77, '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': '7182768', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1074, 'n_words': 195}