Skip to content

Instantly share code, notes, and snippets.

@Zegnat
Created May 2, 2018 21:01
Show Gist options
  • Save Zegnat/c181ad56e78deef36f60d9f3c4b20b6c to your computer and use it in GitHub Desktop.
Save Zegnat/c181ad56e78deef36f60d9f3c4b20b6c to your computer and use it in GitHub Desktop.
@@ -72,7 +72,7 @@ if(!array_key_exists('rsvp', $source)) {
error("Your post doesn't have an 'rsvp' property");
}
-if(strtolower($source['rsvp']) == 'yes') {
+if(preg_match('@^(?<prefixed>remote[\t\n\f\r ]+)?yes(?(prefixed)|([\t\n\f\r ]+remote)?)$@i', $source['rsvp']) === 1) {
// Store the response data to disk so that it's rendered on the event page
$folder = dirname(__FILE__).'/../data/'.$event.'/'.md5($sourceURL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment