Need to exit when doing ajax and smarty
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 2 Aug 2016 18:50:29 +0000 (14:50 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 2 Aug 2016 18:50:29 +0000 (14:50 -0400)
Place exit statement after the echo of rss output.

index.php
models/front/events/rssFeed.php

index cdd76ea..fc707e8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Events
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.2.27
+ * Version: 1.2.28
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -20,7 +20,7 @@
  * @package glmMembersDatabaseEventsAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.2.27
+ * @version 1.2.28
  */
 
 /*
@@ -38,7 +38,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.27');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.28');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.18');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index f5f7547..7870a98 100644 (file)
@@ -38,11 +38,11 @@ class GlmMembersFront_events_rssFeed extends GlmMembersFront_events_baseAction
         if ( isset($_REQUEST['eventId']) && $eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) {
             $search = true;
             $action = 'event-rss';
-        } 
+        }
 
         if ( !isset($eventId) || !$eventId ) {
             $action = 'event-list-rss';
-        } 
+        }
 
         if ( !$action) {
             return '';
@@ -84,5 +84,6 @@ class GlmMembersFront_events_rssFeed extends GlmMembersFront_events_baseAction
         // Generate output from model data and view
         $output = $smarty->template->fetch($viewFile);
         echo $output;
+        exit;
     }
 }