Added more logging, and info on show length to stats
This commit is contained in:
@@ -116,10 +116,10 @@ else {
|
||||
|
||||
$provided_notes = urldecode( $decoded_json["notes"] );
|
||||
|
||||
if ( empty($provided_notes) or strlen($provided_notes) > 100000 ) {
|
||||
problem("Notes are missing not less than max");
|
||||
if ( empty($provided_notes) ) {
|
||||
problem("Notes are missing ");
|
||||
}
|
||||
logextra( "Notes are present and are under the max length" );
|
||||
logextra( "Notes are present " );
|
||||
|
||||
$notes = $provided_notes;
|
||||
|
||||
@@ -531,9 +531,7 @@ if ( strcmp( $host_license, $db_license ) !== 0 ) {
|
||||
logextra( "Updating the host license" );
|
||||
}
|
||||
}
|
||||
else {
|
||||
logextra( "The host_license is the same to that in the db \"$host_license\"" );
|
||||
}
|
||||
logextra( "The host_license is the same to that in the db \"$host_license\"" );
|
||||
|
||||
$title = mysqli_real_escape_string( $connection, $title );
|
||||
$summary = mysqli_real_escape_string( $connection, $summary );
|
||||
@@ -541,10 +539,15 @@ $notes = mysqli_real_escape_string( $connection, $notes );
|
||||
$tags = mysqli_real_escape_string( $connection, $tags );
|
||||
|
||||
$query_add = "INSERT INTO eps VALUES ('$ep_num', '{$ep_date}', '{$title}', '{$duration}', '{$summary}', '{$notes}', '{$host_id}', '{$series_id}', '{$explicit}', '{$episode_license}', '{$tags}', '0', '0', '0')";
|
||||
|
||||
logextra( "About to add to db" );
|
||||
|
||||
$result = mysqli_query($connection, $query_add );
|
||||
if(!$result) {
|
||||
problem("DB problem - The show $ep_num was not added to the eps db.");
|
||||
}
|
||||
logextra( "Response from db \"$result\"" );
|
||||
|
||||
if (mysqli_errno( $connection )) {
|
||||
$error = "MySQL error ".mysqli_errno( $connection ).": ".mysqli_error()."\n";
|
||||
problem("MySQL error- The show $ep_num was not added to the eps db.\n$error");
|
||||
|
||||
Reference in New Issue
Block a user