Update for php notices
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 11 Sep 2018 13:16:49 +0000 (09:16 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 11 Sep 2018 13:16:49 +0000 (09:16 -0400)
Get rid of notices about undefined variables in the templates.

index.php
models/admin/travel/members.php
views/admin/travel/index.html
views/admin/travel/members.html

index 8352305..18d4e13 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Associate - Travel Leads
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Trevel Leads
- * Version: 1.0.0
+ * Version: 1.0.1
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersTravelAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.0
+ * @version 1.0.1
  */
 
 // Check that we're being called by WordPress.
@@ -43,7 +43,7 @@ if (!defined('ABSPATH')) {
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_TRAVEL_PLUGIN_VERSION', '1.0.0');
+define('GLM_MEMBERS_TRAVEL_PLUGIN_VERSION', '1.0.1');
 define('GLM_MEMBERS_TRAVEL_PLUGIN_DB_VERSION', '0.0.5');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 516d8c8..3f406dd 100644 (file)
@@ -110,6 +110,7 @@ class GlmMembersAdmin_travel_members extends GlmDataTravelLeads
         $hasSearch           = false;
         $tab                 = 0;
         $params              = false;
+        $search_params       = false;
 
         // Get any provided option
         if ( isset( $_REQUEST['option'] ) ) {
index 97d00d5..b79bc9e 100644 (file)
@@ -11,7 +11,7 @@
         {if isset($smarty.request.contact)}<input type="hidden" name="contact" value="{$smarty.request.contact}">{/if}
         {if isset($smarty.request.from_date)}<input type="hidden" name="from_date" value="{$smarty.request.from_date}">{/if}
         {if isset($smarty.request.to_date)}<input type="hidden" name="to_date" value="{$smarty.request.to_date}">{/if}
-        {if $smarty.request.state}
+        {if isset($smarty.request.state) && $smarty.request.state}
             {foreach $smarty.request.state as $state}
                 <input type="hidden" name="state[]" value="{$state}">
             {/foreach}
@@ -26,7 +26,7 @@
         {if isset($smarty.request.contact)}<input type="hidden" name="contact" value="{$smarty.request.contact}">{/if}
         {if isset($smarty.request.from_date)}<input type="hidden" name="from_date" value="{$smarty.request.from_date}">{/if}
         {if isset($smarty.request.to_date)}<input type="hidden" name="to_date" value="{$smarty.request.to_date}">{/if}
-        {if $smarty.request.state}
+        {if isset($smarty.request.state) && $smarty.request.state}
             {foreach $smarty.request.state as $state}
                 <input type="hidden" name="state[]" value="{$state}">
             {/foreach}
@@ -44,9 +44,9 @@
     <br clear="all">
     <p><b>Total found:</b> {$leadCount}&nbsp;&nbsp;</p>
     <div class="business-first-letter">
-        <a href="{$thisUrl}?page={$thisPage}&glm_action=index&company={$smarty.request.company}&contact={$smarty.request.contact}#glm-member-list-filters-button" class="glm-alpha-link{if !$alphaSelected} curr{/if}">All</a>
+        <a href="{$thisUrl}?page={$thisPage}&glm_action=index{if isset($smarty.request.company)}&company={$smarty.request.company}{/if}{if isset($smarty.request.contact)}&contact={$smarty.request.contact}{/if}#glm-member-list-filters-button" class="glm-alpha-link{if !$alphaSelected} curr{/if}">All</a>
         {foreach $alphaList as $a}
-        <a href="{$thisUrl}?page={$thisPage}&glm_action=index&alpha={$a.alpha}&company={$smarty.request.company}&contact={$smarty.request.contact}#glm-member-list-filters-button" class="glm-alpha-link{if $a.default} curr{/if}">{$a.alpha}</a>
+        <a href="{$thisUrl}?page={$thisPage}&glm_action=index&alpha={$a.alpha}{if isset($smarty.request.company)}&company={$smarty.request.company}{/if}{if isset($smarty.request.contact)}&contact={$smarty.request.contact}{/if}#glm-member-list-filters-button" class="glm-alpha-link{if $a.default} curr{/if}">{$a.alpha}</a>
         {/foreach}
     </div>
 
index 1e51cf2..a71b714 100644 (file)
@@ -14,7 +14,7 @@
         {if isset($smarty.request.contact)}<input type="hidden" name="contact" value="{$smarty.request.contact}">{/if}
         {if isset($smarty.request.from_date)}<input type="hidden" name="from_date" value="{$smarty.request.from_date}">{/if}
         {if isset($smarty.request.to_date)}<input type="hidden" name="to_date" value="{$smarty.request.to_date}">{/if}
-        {if $smarty.request.state}
+        {if isset($smarty.request.state) && $smarty.request.state}
             {foreach $smarty.request.state as $state}
                 <input type="hidden" name="state[]" value="{$state}">
             {/foreach}
@@ -29,7 +29,7 @@
         {if isset($smarty.request.contact)}<input type="hidden" name="contact" value="{$smarty.request.contact}">{/if}
         {if isset($smarty.request.from_date)}<input type="hidden" name="from_date" value="{$smarty.request.from_date}">{/if}
         {if isset($smarty.request.to_date)}<input type="hidden" name="to_date" value="{$smarty.request.to_date}">{/if}
-        {if $smarty.request.state}
+        {if isset($smarty.request.state) && $smarty.request.state}
             {foreach $smarty.request.state as $state}
                 <input type="hidden" name="state[]" value="{$state}">
             {/foreach}