<commit_before><?php

# Security
defined('INDEX_DIR') OR exit(APP . ' software says .i.');
//------------------------------------------------

class categoriesController extends Controller {
	public function __construct() {
    	parent::__construct(true);
    	if($this->sessions->isLoggedIn()) {
    		$categories = new Categories();
    		if($this->sessions->isGranted()){
    			switch ($this->router->getMethod()) {
    		        case 'add':
  		          	if ($_POST) {
  		            	$categories->add();
  		          	} 
                  break;
                case 'edit':
                  if ($_POST) {
                    $categories->edit();
                  }
                  break;
                case 'delete':
                  if($this->router->getId() != 1){
                    $categories->delete();
                  }
                  break;
                case 'main':
                  $this->render('categories/main');
                  break;
                }
            }
    	}
    }
}

?><commit_msg>Se añadio una variable al controlador<commit_after><?php

# Security
defined('INDEX_DIR') OR exit(APP . ' software says .i.');
//------------------------------------------------

class categoriesController extends Controller {
	public function __construct() {
    	parent::__construct(true);
    	if($this->sessions->isLoggedIn()) {
    		$categories = new Categories();
    		if($this->sessions->isGranted()){
    			switch ($this->router->getMethod()) {
    		        case 'add':
  		          	if ($_POST) {
  		            	$categories->add();
  		          	} 
                  break;
                case 'edit':
                  if ($_POST) {
                    $categories->edit();
                  }
                  break;
                case 'delete':
                  if($this->router->getId() != 1){
                    $categories->delete();
                  }
                  break;
                case 'main':
                  $this->categories = $categories->get();
                  $this->render('categories/main');
                  break;
                }
            }
    	}
    }
}

?>
{'fraction_non_alphanumeric': 0.1757631822386679, 'fraction_numerical': 0.0009250693802035153, 'mean_word_length': 1.0502369668246445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '1677474', 'n_tokens_mistral': 580, 'n_tokens_neox': 539, 'n_words': 97}