<commit_before><?php

include(__DIR__.'/config.php');

 // echo var_dump($_POST);

$alterMode = false;
$editcontentId = Helpers::GetIsSetOrNull("editcontent");
$deletecontentId = Helpers::GetIsSetOrNull("deletecontent");


$cUser = new CUser($mapo['database']);
$isLoggedIn = $cUser->IsAuthenticated();
if(!$isLoggedIn){
    HtmlLogin::LogoutRedirect();
}

/**
 * cContent instance
 */
$cContent = new CContent($mapo['database']);



echo Helpers::PostArrayIsSetOrNull("filter");


/** update -- post */
$editcontent_save = Helpers::PostIsSetOrNull("editcontent_save");
if($editcontent_save != null){
    $updateParam = new StdClass;
    $updateParam->id = Helpers::PostIsSetOrNull("id");
    $updateParam->type = Helpers::PostIsSetOrNull("type");
    $updateParam->title = Helpers::PostIsSetOrNull("title");
    $updateParam->slug = Helpers::MakeSlug($updateParam->title);
    $updateParam->data = Helpers::PostOrEmpty("data");
    $updateParam->filter = Helpers::PostArrayIsSetOrNull("filter");
    $updateParam->deleted = Helpers::PostIsSetOrNull("deleted");
    $updateParam->deleted = $updateParam->deleted == '1' ? true : false;

    $cContent->Update($updateParam);

    $_POST = array();
}

/** delete -- post */
$deletecontent_save = Helpers::PostIsSetOrNull("deletecontent_save");
if($deletecontent_save != null){
    $deleteid = Helpers::PostIsSetOrNull("id");
    if($deleteid != null){
       $deleteid = Helpers::ParseInt($deleteid);
       if(Helpers::IsInt($deleteid)){<commit_msg>remove debug<commit_after><?php

include(__DIR__.'/config.php');

 // echo var_dump($_POST);

$alterMode = false;
$editcontentId = Helpers::GetIsSetOrNull("editcontent");
$deletecontentId = Helpers::GetIsSetOrNull("deletecontent");


$cUser = new CUser($mapo['database']);
$isLoggedIn = $cUser->IsAuthenticated();
if(!$isLoggedIn){
    HtmlLogin::LogoutRedirect();
}

/**
 * cContent instance
 */
$cContent = new CContent($mapo['database']);


/** update -- post */
$editcontent_save = Helpers::PostIsSetOrNull("editcontent_save");
if($editcontent_save != null){
    $updateParam = new StdClass;
    $updateParam->id = Helpers::PostIsSetOrNull("id");
    $updateParam->type = Helpers::PostIsSetOrNull("type");
    $updateParam->title = Helpers::PostIsSetOrNull("title");
    $updateParam->slug = Helpers::MakeSlug($updateParam->title);
    $updateParam->data = Helpers::PostOrEmpty("data");
    $updateParam->filter = Helpers::PostArrayIsSetOrNull("filter");
    $updateParam->deleted = Helpers::PostIsSetOrNull("deleted");
    $updateParam->deleted = $updateParam->deleted == '1' ? true : false;

    $cContent->Update($updateParam);

    $_POST = array();
}

/** delete -- post */
$deletecontent_save = Helpers::PostIsSetOrNull("deletecontent_save");
if($deletecontent_save != null){
    $deleteid = Helpers::PostIsSetOrNull("id");
    if($deleteid != null){
       $deleteid = Helpers::ParseInt($deleteid);
       if(Helpers::IsInt($deleteid)){
{'fraction_non_alphanumeric': 0.1844429347826087, 'fraction_numerical': 0.0006793478260869565, 'mean_word_length': 5.7701149425287355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '4398388', 'n_tokens_mistral': 959, 'n_tokens_neox': 958, 'n_words': 134}