1
0
forked from HPR/hpr_hub

Support for WYSIWYG upload

This commit is contained in:
2024-12-24 15:52:25 +01:00
parent 71124ab014
commit a553beafd5
3 changed files with 25 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
<?php
## Recent Changes
# Changed to support larger embedded images
# METADATA_PROCESSED is now folded into SHOW_SUBMITTED
require "/home/hpr/php/include.php";
date_default_timezone_set('UTC');
@@ -104,7 +108,7 @@ logextra( "license is a valid value" );
$episode_license = $_POST["episode_license"];
if ( empty($_POST["notes"]) or strlen($_POST["notes"]) > 40000 ) {
if ( empty($_POST["notes"]) or strlen($_POST["notes"]) > 100000 ) {
problem("ERROR: Notes are missing not less than max");
}
logextra( "Notes are not missing and are less than max" );
@@ -294,7 +298,7 @@ else {
$ep_num = intval($ep_num);
}
$result = mysqli_query($connection, "SELECT ep_num FROM reservations WHERE ep_num='$ep_num' AND status='METADATA_PROCESSED';");
$result = mysqli_query($connection, "SELECT ep_num FROM reservations WHERE ep_num='$ep_num' AND status='SHOW_SUBMITTED';");
if (!isset($result)) {
problem("ERROR: Cant get info from reservations db");
}
@@ -303,7 +307,7 @@ $db_ep_num = $db_ep_num_array[0];
mysqli_free_result($result);
if ( $db_ep_num != $ep_num ){
problem("ERROR: Cant find $ep_num with status of METADATA_PROCESSED");
problem("ERROR: Cant find $ep_num with status of SHOW_SUBMITTED");
}
$result = mysqli_query($connection, "SELECT `id` FROM `eps` WHERE `id` = '$ep_num';");
@@ -381,6 +385,8 @@ if (mysqli_errno( $connection )) {
problem("ERROR: MySQL error- The show $ep_num was not added to the eps db.\n$error");
}
logextra( "Added the entry: $query_add" );
$result = mysqli_query($connection, "SELECT `id` FROM `eps` WHERE `id` = '$ep_num';");
if (!isset($result)) {
problem("ERROR: DB problem - The show $ep_num has not been added to the eps db");