Would that be $c_year = mysql_real_escape_string($_GET[‘spiffycalyear’]);
to
$c_year = $_GET[‘spiffycalyear’];
?
YESSSSSSSS!!!!
That was it, I guess.
Thanks much for your real time support π
Anonymous User
(@anonymized-1391468)
That’s great. I will make note to replace those calls on the next update.
Oops, we are now unable to edit or delete past events. Message is ” An event with that ID couldn’t be found”.
Could this have something to do with our changes to the PHP yesterday?
Can create new events.
thanks again
N
Anonymous User
(@anonymized-1391468)
Find that string in the code, and just above there is another call to mysql_escape_string. Try removing that call and just use the the following:
$wpdb->get_results(“SELECT * FROM ” . WP_SPIFFYCAL_TABLE . ” WHERE event_id='” . $event_id . “‘ LIMIT 1”);
This code is old and deprecated. I won’t have a chance to update for a while since I am quite busy at the moment.
Sorry, confused. I do not see ANY mysql_escape_string in the code any more. So, I don’t know what to replace.
Anonymous User
(@anonymized-1391468)
Sorry, that should be “mysql_real_escape_string”. Search the code for “An event with that ID”, then look just above it.
Again, sorry, my knowledge of PHP is limited….. here’s the code I tried to use and it obviously is wrong since I got White Screen of Death til I reverted π
// The event edit form for the manage events admin page
function wp_events_edit_form($mode='add', $event_id=false)
{
global $wpdb,$users_entries;
$data = false;
if ( $event_id !== false ) {
if ( intval($event_id) != $event_id ) {
echo "<div class=\"error\"><p>".__('Bad event ID','spiffy-calendar')."</p></div>";
return;
} else {
$wpdb->get_results("SELECT * FROM " . WP_SPIFFYCAL_TABLE . " WHERE event_id='" . $event_id . "' LIMIT 1");
if ( empty($data) ) {
echo "<div class=\"error\"><p>".__("An event with that ID couldn't be found",'spiffy-calendar')."</p></div>";
return;
}
$data = $data[0];
}
// Recover users entries if they exist; in other words if editing an event went wrong
if (!empty($users_entries)) {
$data = $users_entries;
}
} else {
// Deal with possibility that form was submitted but not saved due to error - recover user's entries here
$data = $users_entries;
}
Anonymous User
(@anonymized-1391468)
Can you email [email protected] so we can continue our conversation there?
This is a site-specific issue so it isn’t helpful to discuss here.