From: Steve Sutton Date: Fri, 4 Mar 2016 17:43:34 +0000 (-0500) Subject: Update for error messages X-Git-Tag: v1.0.0^2~184 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6e475f5cb883a74672253107b97b53780414b3cf;p=WP-Plugins%2Fglm-member-db-events.git Update for error messages Getting rid of notices in php --- diff --git a/models/front/events/detail.php b/models/front/events/detail.php index f37ba79..26b4d38 100644 --- a/models/front/events/detail.php +++ b/models/front/events/detail.php @@ -72,6 +72,7 @@ class GLmMembersFront_events_detail extends GlmDataEvents */ public function modelAction($actionData = false) { + $status = null; $action = ''; $settings = $event = array(); @@ -106,15 +107,11 @@ class GLmMembersFront_events_detail extends GlmDataEvents break; } - - // Compile template data $templateData = array( 'siteBaseUrl' => GLM_MEMBERS_EVENTS_SITE_BASE_URL, - 'categoryId' => $categoryId, 'categories' => $categories, - 'event' => $event, - 'catEvents' => $categoryEvents + 'event' => $event ); return array( diff --git a/models/front/events/list.php b/models/front/events/list.php index 60278ac..422ba1b 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -81,27 +81,37 @@ class GlmMembersFront_events_list extends GlmDataEvents */ public function modelAction($actionData = false) { - $categoryId = null; + $status = $categoryId = null; $action = ''; $settings = $events = $event = array(); - if ($eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) { + if (isset($_REQUEST['eventId']) && $eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) { $search = true; $action = 'event-detail'; } - if ($categoryId = filter_var($_REQUEST['category'], FILTER_VALIDATE_INT)) { + if (isset($_REQUEST['category']) && $categoryId = filter_var($_REQUEST['category'], FILTER_VALIDATE_INT)) { $search = true; $action = 'event-list'; } - if ($search = filter_var($_REQUEST['search'], FILTER_VALIDATE_INT)) { + if (isset($_REQUEST['search']) && $search = filter_var($_REQUEST['search'], FILTER_VALIDATE_INT)) { $search = true; $action = 'event-list'; } - $fromDate = filter_var($_REQUEST['glm_event_from'], FILTER_SANITIZE_STRING); - $toDate = filter_var($_REQUEST['glm_event_to'], FILTER_SANITIZE_STRING); + if ( isset($_REQUEST['glm_event_from']) ) { + $fromDate = filter_var($_REQUEST['glm_event_from'], FILTER_SANITIZE_STRING); + } else { + $fromDate = false; + } + if ( isset($_REQUEST['glm_event_to']) ) { + $toDate = filter_var($_REQUEST['glm_event_to'], FILTER_SANITIZE_STRING); + } else { + $toDate = false; + } - if ($eventNameSearch = filter_var($_REQUEST['event_name'], FILTER_SANITIZE_STRING)) { + if (isset($_REQUEST['event_name']) && $eventNameSearch = filter_var($_REQUEST['event_name'], FILTER_SANITIZE_STRING)) { $search = true; $action = 'event-list'; + } else { + $eventNameSearch = false; } $categories = $this->getCategories(); diff --git a/models/front/events/testEventsData.php b/models/front/events/testEventsData.php index e314c1c..a787eaa 100644 --- a/models/front/events/testEventsData.php +++ b/models/front/events/testEventsData.php @@ -23,6 +23,13 @@ $events = array( 'starting' => '03/01/2016', 'ending' => '03/01/2016', 'description' => '

Since 2006, artists Ginger Owen and Vicki VanAmeyden have been collaborating on process-driven artworks. Join both artists as they discuss the collaborative process, their recent body of work "Heritage Habitats", the relevance of their individual works, and the practice of collaboration in their respective courses.

Brown bag lunches welcome.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 1 ), array( @@ -32,6 +39,13 @@ $events = array( 'starting' => '03/26/2016', 'ending' => '03/26/2016', 'description' => '

Get ready for spring at the Easter craft & vendor show. Held in Expo South.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 1 ), array( @@ -41,6 +55,13 @@ $events = array( 'starting' => '05/11/2016', 'ending' => '05/11/2016', 'description' => '

History enthusiasts and novices alike will love this tour. Take an hour to explore the entire castle and grounds: basement areas not regularly open to guests, the organic gardens, and our Bordeaux style wine cave.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 2 ), array( @@ -50,6 +71,13 @@ $events = array( 'starting' => '06/11/2015', 'ending' => '06/10/2016', 'description' => '

Colour Correction: British and American Screenprints, 1967-75 features work by 32 artists, including some of Andy Warhol\'s iconic images of Marilyn Monroe, Mao Zedong, and a can of Campbell\'s Tomato Soup. Invented in the early 20th century as a quick, low-cost way to create colorful, graphic prints, silkscreening was originally and primarily used for advertising. "Colour Correction chronicles a time of social and political change, and change in the world of contemporary art," says Karla Niehus, KIA Associate Curator of Exhibitions. "These artists were among the first to use screenprinting outside the commercial advertising arena. They helped redefine the medium as a fine art form and created some of the most innovative and resonant printmaking of the era." On view will be works by some of the best-known printmakers, including Josef Albers -- whose work was recently added to the White House walls at the request of President and Mrs. Obama. The KIA\'s two largest galleries will hold the exhibition\'s 80 prints, which range from the fanciful Pop art of Nicholas Monro to the political critiques of May Stevens and the minimalist abstractions and optical exercises of Richard Anuszkiewicz, William T. Williams, and Liliane Lijn. Additional artists shown will be Ilya Bolotowsky, Patrick Caulfield, Robyn Denny, Patrick Heron, Patrick Hughes, R.B. Kitaj, Robert Motherwell, Peter Phillips, John Piper, Larry Rivers, and Richard Smith. The exhibition was organized by the Nasher Museum of Art at Duke University and curated by Marshall Price, Ph.D., the Nancy Hanks Curator of Modern and Contemporary Art at the Nasher Museum. Dr. Price will be at the KIA for a presentation sponsored by the Kalamazoo Art League on December 9 at 10 am. He will discuss the printmaking renaissance of the 1960s in the U.K. and the U.S.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 2 ), array( @@ -59,6 +87,13 @@ $events = array( 'starting' => '12/12/2016', 'ending' => '12/13/2016', 'description' => '

Work by three artists from the 2015 ArtPrize exhibition in Grand Rapids - all of it 3D sculpture that will be hanging from the galleries ceilings.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 2 ), array( @@ -68,6 +103,13 @@ $events = array( 'starting' => '04/21/2016', 'ending' => '04/21/2016', 'description' => '

This is an opportunity to taste a variety of wines. The evening is a fun one with live music, a variety of wines to sample and delicious hors\'doeuvers prepared by "Just Good Foods" in the Rose Street Market.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 3 ), array( @@ -77,6 +119,13 @@ $events = array( 'starting' => '05/14/2016', 'ending' => '05/14/2016', 'description' => '

Patrick Henry\'s annual beer collectibles show at Bell\'s Brewery in Kalamazoo, Michigan. Beer cans, neons, bottles, steins, tap handles, glasses, and MORE. This show will have everything you could possibly want to decorate your man cave or rec room. Make a weekend of it and enjoy some of Michigan\'s greatest craft breweries. The one dollar cost of admission will be donated to the Boys & Girls Club of Kalamazoo.

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 3 ), array( @@ -102,6 +151,13 @@ $events = array( 'starting' => '02/25/2016', 'ending' => '02/25/2016', 'description' => '

Test event description text here!

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 7 ), array( @@ -111,6 +167,13 @@ $events = array( 'starting' => '02/28/2016', 'ending' => '02/28/2016', 'description' => '

Test event description text here!

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 7 ), array( @@ -120,6 +183,13 @@ $events = array( 'starting' => '02/29/2016', 'ending' => '02/29/2016', 'description' => '

Test event description text here!

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 7 ), array( @@ -129,6 +199,13 @@ $events = array( 'starting' => '02/29/2016', 'ending' => '02/29/2016', 'description' => '

Test event description text here!

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 7 ), array( @@ -138,6 +215,13 @@ $events = array( 'starting' => '03/01/2016', 'ending' => '03/01/2016', 'description' => '

Test event description text here!

', + 'url' => '', + 'street' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'email' => '', + 'cost' => '', 'category' => 7 ) );