<commit_before><?php
//
//        File: edit_perm.php
//
// Description
//
// public bool Rbac->{Entity}->edit(int $ID, string $NewTitle = null, string $NewDescription = null)
//
// Edits an Entity, changing the Title and/or Description. Maintains ID.
// Parameters
//
//  ID
//     Accepts the int ID of the Entity you would like to change. 
//
// NewTitle
//     Accepts a new string Title. 
//
// NewDescription
//     Accepts a new string Description. 
//
// Return Values
//
// Returns true if successful, false if the Entity does not exist.
//
//
//Revision:2014090501
//

require_once '/var/www/Classes/PhpRbac/src/PhpRbac/Rbac.php';

$P_ID  = "";
$TITLE = "";
$DESCR = "";

if( isset($_REQUEST['r_id']) ) {
	$P_ID = $_REQUEST['p_id'];
}
if( isset($_REQUEST['title']) ) {
	$TITLE = $_REQUEST['title'];
}
if( isset($_REQUEST['descr']) ) {
	$DESCR = $_REQUEST['descr'];
}

if( $P_ID == "" AND $TITLE == "" AND $DESCR == "" ) {<commit_msg>bug fix and change parameters validation logic<commit_after><?php
//
//        File: edit_perm.php
//
// Description
//
// public bool Rbac->{Entity}->edit(int $ID, string $NewTitle = null, string $NewDescription = null)
//
// Edits an Entity, changing the Title and/or Description. Maintains ID.
// Parameters
//
//  ID
//     Accepts the int ID of the Entity you would like to change. 
//
// NewTitle
//     Accepts a new string Title. 
//
// NewDescription
//     Accepts a new string Description. 
//
// Return Values
//
// Returns true if successful, false if the Entity does not exist.
//
//
//Revision:2014090502
//

require_once '/var/www/Classes/PhpRbac/src/PhpRbac/Rbac.php';

$P_ID  = "";
$TITLE = "";
$DESCR = "";

if( isset($_REQUEST['p_id']) ) {
	$P_ID = $_REQUEST['p_id'];
}
if( isset($_REQUEST['title']) ) {
	$TITLE = $_REQUEST['title'];
}
if( isset($_REQUEST['descr']) ) {
	$DESCR = $_REQUEST['descr'];
}

if( $P_ID == "" OR $TITLE == "" ) {	// p_id, title must be given
{'fraction_non_alphanumeric': 0.19067357512953367, 'fraction_numerical': 0.010362694300518135, 'mean_word_length': 2.9327902240325865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6464600', 'n_tokens_mistral': 707, 'n_tokens_neox': 686, 'n_words': 183}